On Fri, 2012-03-02 at 08:52 +0100, Bernhard Voelker wrote:
On 03/01/2012 11:30 PM, lynn wrote:
Hi 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. Thanks, 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 users $ 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.
If the directory cannot be changed, how does the date of modification get updated? Yours sincerely, Roger Oberholtzer OPQ Systems / Ramböll RST Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 roger.oberholtzer@ramboll.se ________________________________________ Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden www.rambollrst.se -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org