Samba Notify ModuleWhat is it?
Samba Notify Module is a small Samba VFS plugin that notifies the user with a popup message whenever he tries to upload
files with a certain MIME tyes to a share. For example, you might not want mp3 files on a public share so you could simply add:
[Public] comment = Public share writable = yes path = /opt/public vfs object = notify # Mime types to notify on.. notify:notify on = audio/mpeg; # Script to use to notify the user notify:script = sh -c 'echo "Mp3 files are not allowed!" | \ /usr/bin/smbclient -M %m -I %I' # Also deny creation of files with the abovementioned MIME type # Note that if you use veto files = /*.mp3/ # you'll never even reach the notify module notify:deny = yes
With this configuration, users won't be able to upload mp3 files to the Public share, and get a message whenever they try to do so.Usage and configuration
--with-samba-source= make make install
After installation just add the vfs object to a share in smb.conf. See the above snippet, for an example.
Note :This module isn't really meant as a full fledged solution to disallow specific data files on your samba shares. It's fairly simple to work around it, by compressing a file or by applying other methods.
- Initial Release