On 11/12/09, Aristotelis <[email protected]> wrote: > Bryan wrote: > > > > Couldn't you just have the directory owned by another person, but make > > the owner and the user be part of the same group, and make the > > directory group writable? The owner can delete, having the sticky > > bit, but users in the group can put files in the directory, and they > > can't delete them. > > > > I'm not quite sure if this is true. > > In this example : > > #ls -ld kot > drwx-wx--T 2 root arisg 512 Nov 11 17:45 kot > > I have the directory with sticky bit and also the group has write access > (the group name is arisg like my login name) > > > $cat > kot/lala > test test > $ > > I created the lala file > $ls -l kot/lala > -rw-r--r-- 1 arisg arisg 10 Nov 12 11:06 kot/lala > $ > > and then > $rm kot/lala > $ > > so i can remove it. > > It seems that i doesn't provide the solution i want .. or i'm just missing > something.
Well that's because you're deleting it as yourself, right? And you were the creator so you're the owner, so sticky(8) doesn't apply. You should find that other users can't delete files (make yourself a test user and login as that). Is it really that critical that users feeding you can't delete their own files? Admittedly if that's necessary I can't think of a great solution off the top of my head. You could run famd(8) and write a little app that listens for new files and changes their owner, or more simply you have users upload to a special subfolder (with permissions 220 maybe?) and run a cronjob every few minutes that moves files out into the main backup dir and sets permissions as you like. -Nick
