Block certain file extensions on samba linux

Block certain file extensions on samba linux

If you are using Samba server in your organization and want to restrict some file types to upload in shared directory. then you can use veto file to block certain file type in samba, You can restrict to upload mp3, mp3, exe, or any file types using it.
Here i have shared a directory name "vishal" and block some file extentions using veto file in samba.
Open samba config file and added veto file to last line of your shared block.
$ vim /etc/samba/smb.conf
comment = vishalvyas
Path = /home/vishal
public = yes
writable = yes
browseable = yes
read only = no
valid user = vishal
create mask = 0775
Veto files = /*.exe/*.com/*.dll/*.bat/*.vbs/*.tmp/*.mp3/*.avi/*.mp4/*.wmv/*.wma/

Linux Guru

Welcome to my Linux blog! Hello Friends, I am Vishal Vyas. I am a DevOps engineer and expert in Linux and Cloud Computing. Also I am a Certified Kubernetes Administrator, I have a total 12 plus years of experience in the IT field and I have worked in various technologies. I write about Linux, AWS, DevOps and web Technologies, I have started this blog to share my technical knowledge with all, I am posting here what I learn from the latest web technologies and the likes.


  1. That is very interesting; you are a very skilled blogger. I have shared your website in my social networks..!

    Informatica Training in Chennai

  2. how if i want just one files type allowed on samba share

  3. I am using samba server and shares are mapped in windows. Will veto files restrict from copying files from windows samba share

Previous Post Next Post