Problem with deleting files

Chris Andrews chris at netsw.co.uk
Sun Oct 29 20:41:33 GMT 2000


> On Sun, 29 Oct 2000 12:40:13 +0100, you wrote:
> 
> >I have a file "shared" with rwxrwxrwx so that all persons of all groups =
> can
> >all can write, read and execute files. How do I manage that only the =
> person
> >who creates a file can delete it? Even with force create mask the =
> directory
> >can be deleted because of the necessary w-right in "shared".
> 
> So you have a file and want grant access to all to modify it, but only
> the owner should be able to delete it?
> This is difficult (if not impossible) to do, with current unix
> permissions attributes (maybe acl will help in the future).
> 
> The fact is that for many windows progs to edit a file means: create a
> new file, _delete_ the old one.
> 
> --=20
> giulioo at pobox.com
> 

That's a bit misleading - Unix has just this facility. 

If you have a directory with permissions rwxrwxrwx then anyone will be
able to create and delete files in it. If you set the `sticky bit' on the
directory, then only the owner of the file, i.e. the creator of the file,
will be able to delete it. 

To set the permissions on your directory like this, use:

# chmod 1777 directory-name

This should do what you want.

Chris.





More information about the samba mailing list