Ben van der Merwe wrote:
>Hi,
>
>I am experiencing great difficulty configuring the following:
>
>1. Users who create files in a share, must have full rights.
>
>2. Other users must be able to all view files, but not edit or delete them,
i.e. everyone has read-only access to all files except those they created
themselves (which they can modify and delete).
>
>The following definition allows the read-only part (files cannot be
modified), but other users can still delete the files! What am I doing wrong?
>
You should include the sticky bit on the directories.
force directory mode = 2770
find /mnt/store/Work -type d -ok chmod +t {} \;
STICKY DIRECTORIES
When the sticky bit is set on a directory, files in that
directory may only be unlinked or renamed by root or their
owner. (Without the sticky bit, anyone able to write to
the directory can delete or rename files.) The sticky bit
is commonly found on directories, such as /tmp, which are
world-writable.
>
>
>[Work]
> path = /mnt/store/Work
> writeable = yes
> valid users = +officeusers
> force create mode = 0750
> force directory mode = 0770
> force group = officeusers
>