2
0
In GNU/Linux, how can directories be set such that the owner can only add/read files/directories to/from them but only a super user can do any deletion in that structure?
Consider this scenario: You are rsync
ing some files and directories you own to a directory. You want to be able to write to that directory (and later, when updating the backup---i.e., rsync
ing again---write to all of the subdirectories, too) but you don't want to be able to delete anything in this structure, unless you are a super user.
The restricted deletion flag t
in chmod
does not help in this situation, because it restricts deletion by non-owners.
Setting the mode to u=rX,go=
for the files and directories (while transferring using rsync
) does not help either, because later rsync
ing will not be possible unless the w
mode bit is added to all of the directories on the receiver before starting the rsync
and that will be very time consuming.
Is ACL the way to go here?
Update: Even with ACL I don't see a way to do this.
The point in my question is to not have the owner changed. – Omid – 2011-07-04T21:29:13.927