Just for my own sanity - wouldn't setting the sticky bit on the containing directory do the job for the OP?
i.e. chmod 1700 on the directory.
As far as I understand it that would stop other users deleting the files contained within (presuming the OP owns the directory and files). Wouldn't stop a sudo'er I don't suppose.
Just asking as I'm not entirely sure my understanding of it is correct
Edit - after some further reading it seems for this to be an effective solution one would have to create two directories, one inside the other and sticky bit them both otherwise an rm -rf of the single stickied directory would be possible taking the files with it. I think I need to experiment and see if my theory is correct
Last edited by cryptotheslow; August 19th, 2011 at 04:47 PM. Reason: Additional info...
Bookmarks