Question : Limit Files on a Samba Share - Oppisite of veto files

I would like to limit the files that PC users and place in a Linux samba share.  For instance, I would like PC users to only be able to place a file called testfile.txt on the share.  I can use the veto files = option to restrict certain files, but would like to only allow certain files.  I was hoping the veto option would take a ! (not) but it doesn't seem to.  Any suggestions on how to achieve this?

Answer : Limit Files on a Samba Share - Oppisite of veto files

You don't need to use Samba permissions to do this.

First create the PC-only share folder on Linux:
mkdir sharedir

Next create the file(s) that you want to be able to copy:
cd sharedir
touch  testfile.txt

Now allow anybody to overwrite those files:
chmod 666 testfile.txt

Then remove write permission to the directory:
cd ..
chmod 555 sharedir

Now nobody can write new files to that folder but those existing files can be over-written because they have write permission for all users.  The files can't be removed, only over-written.

Seems to work on my Samba share here.
Random Solutions  
 
programming4us programming4us