Path: utzoo!attcan!cmtl01!matrox!uvm-gen!uunet!lll-winken!ames!pasteur!ucbvax!decwrl!decvax!eagle_snax!geoff From: geoff@eagle_snax.UUCP ( R.H. coast near the top) Newsgroups: comp.protocols.tcp-ip.ibmpc Subject: Re: pc-nfs group access permissions Summary: it works, but it's easy to go wrong. Message-ID: <452@eagle_snax.UUCP> Date: 25 Jan 89 13:46:33 GMT References: <3031@uhccux.uhcc.hawaii.edu> Reply-To: geoff@eagle_snax.UUCP (Geoff Arnold @ Sun ECD - R.H. coast near the top) Organization: Sun Microsystems - East Coast Division Lines: 49 In article <3031@uhccux.uhcc.hawaii.edu> richard@uhccux.uhcc.hawaii.edu (Richard Foulk) writes: >I'm trying to use unix group permissions to allow two PC users on >our network to share files (read and write). According to the >pc-nfs manual a single group is supported. Unfortunately, so far >my attempts to make it work have failed. > When I read your posting, I sat down to try it at once. I began by creating a directory from Unix, then mounting the file system and CHDIR'ing to it on DOS with a different UID but the same GID. Ooops - it DOES seem to be broken. Then I tried again, but created the directories under PC-NFS. This time, it seemed to work. What's going on here? What I was running into (and what I suspect that Richard encountered) is one of the more common misunderstandings under BSD-based Unix systems. When you create a directory... The directory's owner ID is set to the process's effective user ID. The directory's group ID is set to that of the parent directory in which it is created. from mkdir(2) under SunOS 3.2 - under SunOS4.0 it's different: The directory's owner ID is set to the process's effective user ID. The directory's group ID is set to either: + the effective group ID of the process, if the filesystem was not mounted with the BSD file- creation semantics flag (see mount(2)) and the set- gid bit of the parent directory is clear, or + the group ID of the directory in which the file is created. PC-NFS always sets the GID to that of the "creating process" (i.e. the user's GID from "net name"). Many folks assume that this happens under Unix, but 'taint necessarily so... Geoff -- Geoff Arnold, Sun Microsystems Inc. | "It is well known that the longer one PC Dist. Sys. Group (home of PC-NFS) |postpones a pleasure, the greater the UUCP: {hplabs,decwrl...}!sun!garnold |pleasure when it arrives. Therefore, if ARPA: garnold@sun.com |one postpones it forever..." (Smullyan)