From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <97955025728041.tru64-unix-managers.marc@archive.invalid> From: Peter Mittermayer Date: Mon, 15 Jan 2001 09:17:22 +0000 To: tru64-unix-managers Subject: SUMMARY: file ownership - where? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=97955025728041 Original question: Thanks to all who answered!! > > Hi, > > I wonder where the group for files is managed in tru64 unix. we have a > user which is group A according to passwd file and also member of group > B and C according to group file. all the files created by this user > however belong to group B instead of A (from passwd). > > can anyone please explain this behaviour to me?? > > TIA, > > Peter Answers e.g.: --------------------------------------------------------------------- James Sainsbury: My guess is that the parent directory is owned by group B eg drwxrwxr-x 30 User B 1024 Jan 8 10:54 . and the filesystem is mounted with BSD semantics (the default) See mount(8) grpid/nogrpid options. If the filesystem is mounted nogrpid then a new file will inherit the user's group id but you can always set the BSD behaviour on a per directory basis by setting the setgid bit (chmod g+s dir.) --------------------------------------------------------------------- Michael A Crowley: TU UFS uses the Berkeley Software Distribution (BSD) scheme of having a file's group designation absorb the group of the parent directory. The ATT System V scheme was to have the primary group of the user used for a new file. Note with Linux and TU you may specify in fstab which scheme you wish to use, but the defaults are different. The man page for mount on Linux includes: grpid or bsdgroups / nogrpid or sysvgroups These options define what group id a newly created file gets. When grpid is set, it takes the group id of the directory in which it is created; other� wise (the default) it takes the fsgid of the cur� rent process, unless the directory has the setgid bit set, in which case it takes the gid from the parent directory, and also gets the setgid bit set if it is a directory itself. The man page for mount on TU5.1 includes: grpid Enables new files to inherit the parent directory's group ID. This is the default and matches BSD semantics. nogrpid Applies SVID 3 semantics. For example, if the parent directory's mode bits include IS_GID, then the new file will inherit the parent's group ID. If IS_GID is off, then it inherits the process group ID. ---------------------------------------------------------------------