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

Re: default group ownership of a file



Michael Schurter wrote:
ChadDavis wrote:

Hello. I need to know how the group ownership of a file is decided in debian. Also, is it the same for all linux systems?


All Linux (and probably Unix) filesystems store a group ID number (gid) on a per-file basis. The gid is looked up in /etc/group to get the textual group name you're used to seeing.

All users have a primary group membership as well as any number of secondary group memberships. (use the /usr/bin/id command to get that info) When a user creates a file, that file's group owner is set to the users primary group.

This is also affected by the newgrp command, I believe.

You can change the group ownership of a file with the /usr/bin/chown or /usr/bin/chgrp commands. You can change the group membership of a user with the /usr/sbin/usermod command.

Michael Schurter




--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!



Reply to: