On Thursday 07 February 2008 20:07, Pietro Cerutti wrote: > HostServer exports via NFS /www, which belongs to user:www > (uid=1001, gid=80). The directory has the segid flag set: > > drwsr-xr-x 13 user www 512 Feb 7 00:58 www > > HostClient mounts the exported directory on /share/www. HostClient > doesn't know anything about gid 80. > > Now, on HostClient, user copies aFile to /share/www using the -p flag of > cp(1). > > > cp -p aFile /share/www/ > > ls -l > > -rw------- 1 user user 2981888 Feb 7 01:09 /www/aFile > > As shown, the setgid flag of /www hasn't worked.
Hang on - you asked cp to preserve the user and group ownership of the file (cp -p). As far as I can see, it's done what you asked it to. I would regard any other result as violating the Principle of Least Astonishment. and on Thursday 07 February 2008 20:48, Chuck Swiger wrote: > On Feb 7, 2008, at 10:42 AM, Pietro Cerutti wrote: > > From HostClient: > >> ls -al /share/ > > > > drwxr-sr-x 4 User www 512 Feb 7 19:23 www > > > >> touch /share/www/foo > >> ls -l /share/www/foo > > > > -rw-r----- 1 user www 0 Feb 7 19:39 /share/www/foo > > > > (group id works) > > Right, this is the BSD setgid semantics one would expect. Surely the BSD way is always to inherit group ownership from the directory? setgid is only used on SYSV systems to emulate the BSD semantics on a per-directory basis - or have I got this completely wrong? Jonathan _______________________________________________ firstname.lastname@example.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"