Ubuntu Server 8: Managing users & groups: How to?

Smoot Carl-Mitchell smoot at tic.com
Tue Jul 1 00:44:17 UTC 2008


On Mon, 2008-06-30 at 17:41 -0500, Robert Dailey wrote:

> From what I can tell, each file or directory on the system can have a
> user AND a group associated with it. This doesn't make much sense to
> me. If I'm user 'foo', and I have a group named 'test' which I am in,
> and I assign the following to a file:
> 
> USER: foo
> GROUP: test
> 
> I've technically been added to this file 2 times, so which permissions
> does the system choose for me? The ones from the group that I'm in, or
> the user permissions? It would make more sense to add *only* groups to
> files and directories, things would seem more consistent that way. I
> don't see a point in just assigning a single user as  a special case,
> when all you really need to do is assign a group with only 1 user in
> it.

The permissions granted are for the user "foo".  They supersede the
group permissions. Since "foo" owns the file, you can change the files
permissions and even set the group to any group you are a member of.  If
you are only a member of the group you cannot change the file
permissions.  The "root" user (uid 0) is a special case.  That user can
change ownership and permissions on any file.

With ACLs, a file can have multiple user or group permissions.  See the
acl manual page in section 5:

man 5 acl



-- 
Smoot Carl-Mitchell
System/Network Architect
smoot at tic.com
+1 480 922 7313
cell: +1 602 421 9005




More information about the ubuntu-users mailing list