Re: Assigning group rights (was: Re: Root isn't God

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2003-12-20 at 23:17, Bruce W. Bigby wrote:
> > > /dev/hda1       /c          vfat   
> > > defaults,uid=bigby,gid=bigby,umask=007   1 2

> Note: In my case, I set the general ownership of my vfat file system
> files to the user, bigby, which is my family user id.  I set the group
> to the bigby group.  Everyone whom is a member of the bigby group can
> read, write, or execute/search the files/directories on the vfat disk.

Also worth noting, if using a native filesystem (EXT2/3, XFS, etc) you
can inherit user or group ownership by setting set-gid on the parent
directory.  (Looks like SUID and SGID options have been removed/hidden
in file properties in GNOME.)

Let's say that I want all users, by default, to be able to modify all
new files written to the Library directory.

I'd set-gid "users" on the Library directory like this:
$ chgrp users Library
$ chmod g+s Library

Which results in these permissions:
$ ls -l
drwxrwsr-x   40 someuser    users        2048 Dec 19 22:55 Library

Now lets make a new directory and file in Library and see what happens:
$ mkdir Library/Test
$ touch Library/Testfile

Notice that the group permissions have been inherited from Library:
$ ls -l Library
drwxrwsr-x    6 someuser    users        2048 Dec 20 18:49 Test
-rw-rw-r--    1 someuser    users           0 Dec 21 14:10 Testfile

What if I don't want some other group to own Testfile?
$ chgrp someuser Library/Testfile
$ ls -l Library
drwxrwsr-x    6 someuser    users        2048 Dec 20 18:49 Test
-rw-rw-r--    1 someuser    someuser        0 Dec 21 14:10 Testfile

-- 
 David Norris
  http://www.webaugur.com/dave/
  ICQ - 412039

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux