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
rsyncing 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.,
rsyncing 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
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
rsyncing 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.