[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: File Permissions: Allow write, but not modify



Quoting Chris Purves <chris.purves@gmail.com>:

Is it possible to set up a directory so that a user can add a new
file, but once the file is there the same user cannot modify, rename,
or delete the file?

The shared directory is a samba share, and will only be accessed
through windows, so solving this problem through samba is just as
good.

Sounds like you want a drop box.
This is what we do at our work place for drop boxes.

# chmod 2773 /usr/local/share/dropbox

# ls -l
drwxrws-wx  2 root  staff 4096 Aug 18 07:48 dropbox

Then set your samba share to inherit permissions.
This should allow a regular user to drop files or folders.
If they drop a file, I don't think they will be to overwrite it.
However, if they drop a folder with a file in it, and then do it again,
they should be able to overwrite it. For most cases, we ask our users to drop
folders, that way they can overwrite it if they made a mistake on a file and need to re-drop it in. Either way, only the orignal user who drops stuff in, and the owners/groups of the share have access.

You can do the same for a netatalk share too, but folder drops do not work quite right.

Hope this helps,
Cheers,
Mike






Reply to: