Mailinglist Archive: opensuse (1165 mails)

< Previous Next >
Re: [opensuse] windows modify acl on openSUSE
On 03/01/2012 11:30 PM, lynn wrote:
Is there a way to implement m$ modify? i.e. a group can read and write
files but not change their name? _I_'ve looked through setfacl but it
doesn't seem to cover this one.
L x

For renaming a file you need write permissions to the directory.
Therefore, just set the group permissions of the directory to g-w
and for the files to g+w:

$ id -gn
$ ls -ld . a
drwxr-x--- 2 root users 4096 Mar 2 08:40 .
-rw-rw---- 1 root users 6 Mar 2 08:45 a
$ echo hello > a
$ rm a
rm: cannot remove `a': Permission denied
$ mv a d
mv: cannot move `a' to `d': Permission denied

Of course, in this example, only root can create new files.
So check out for the sticky bit, usually applied e.g. in /tmp.

Have a nice day,
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups