Problem deleting full dirs from my sticky drop box...

thwomp

Registered
Ok, this is a problem I had on a Linux system/network, but I was wondering how to fix it on either Linux or OSX if there is a different (HFS+?) way:

I created a drop-box directory, with the sticky bit set (`chmod 1777 .`). I want other users to be able to put files or entire directories there, without me having to to find things over on their home space. (Long story; it's really the best solution though on our mixed Win/Linux network.)

So, this works out fine for individual files; anyone can put files and not delete other user's drops, and I can delete them later if necessary. The problem ends up being that if someone puts a (non world-writable) directory with files they own in the drop box. I can't delete these sub-files, and therefore cannot remove the (non-empty) directory! I don't think other users can disown files, either, and that or changing permissions could be a hassle anyways for Windows types, even with Cygwin. And I don't want to have to ask other users to delete directories when I want to get rid of them...

The only viable solution I can come up with is to set the setuid/setgid permissions on the drop box, too (`chmod 7777 .`). If I understand correctly, this will recursively change the ownership of each file and directory put in the drop-box. Is there a better way to do this (and will this even work)? I've read that this sort of action is filesystem-dependent, too (see `man chmod`); is this correct? I need some details here. And I don't want to tick off the sysadmins! :confused:

Of course, I could ask everyone to `tar cvzf` all their drops, but that makes life just too easy for me...
 
Back
Top