Linux, DevOps and Cloud Expert at Linux Guru !

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
[Vishal]
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/

2 comments:


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


    Informatica Training in Chennai

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

    ReplyDelete