[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 312
  • Last Modified:

2's company; 3's a realm?

When assigning permissions to a file, one owner and one "world" are considered. But how many groups can access a single file with separate rwx rights? If the answer is more than one group, how would these rwx rights be displayed? Im asking both questions because i am interested in the collaboration possibilities that linux has to offer as well as any worthwhile means of administering such collaborating. thanks in advance for any info.
0
7of9121699
Asked:
7of9121699
1 Solution
 
patowicCommented:
A file can only be owned by a single group, but this does not impede collaboration at all.  The easiest way to work around this is to create a special group for owning the file, then make sure that everyone who needs access to that file is a member of that group.  For example, if I have:

drwxrwx---    1 thx1138  justme       2645 Mar 19  1996 netcat.blurb

And I need to have the following people access the file
tom (member of users)
dick (member of mail)
harry (member of adm)

(such that /etc/group looks like this

users:125:tom
mail:126:dick
adm:127:harry

all I need to do is add a new group to the end of the /etc/groups file.  This line would look like this:

justme:128:tom,dick,harry

Now, all three individuals have read, write and execute permission for that file.

As you can see, the single-group feature of *nix security offers everything that multiple group ownership does, but is easier to track.
0
 
7of9121699Author Commented:
Thx alot to patowic;

you have hit the nail on the header file, so to speak....   L8R
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now