[comp.unix.ultrix] group file permissions across NFS under Ultrix 3.0

envbvs@epb2.lbl.gov (Brian V. Smith) (05/14/89)

Original problem:

>From article <2597@helios.ee.lbl.gov>, by envbvs@epb2.lbl.gov (Brian V. Smith):
>> remotely mounted file system.  In Ultrix 2.3 (and previous) the umask
> was used in determining the permissions when creating a file, but 
>> Ultrix 3.0 is ignoring it.
>> 

Here is a workaround provided by Jan Sanislo from washington.edu:

>I belive the problem stems from the fact that the default
>file creation mask (CMASK in sys/param.h) has been changed
>from 0 in 2.X to 022 in 3.0.  The nfs daemons (/etc/nfsd) on
>the server inherit this mask when they are started.  The
>protection modes of files created over the wire are &'d with
>~CMASK in the usual way.  It is thus impossible to enhance
>write permissions via a umask on the remote node (although
>it is possible to restrict them (e.g., umask 66).
>
>You should be able to cure the problem by saying "umask 0"
>before starting up /etc/nfsd in /etc/rc.local.  

This works. In other words:

(in /etc/rc.local)
	...
	umask 0
	/etc/nfsd 4
	...
_____________________________________
Brian V. Smith    (bvsmith@lbl.gov)
Lawrence Berkeley Laboratory
We don't need no signatures!

grr@cbmvax.UUCP (George Robbins) (05/15/89)

In article <2644@helios.ee.lbl.gov> envbvs@epb2.lbl.gov (Brian V. Smith) writes:
> >From article <2597@helios.ee.lbl.gov>, by envbvs@epb2.lbl.gov (Brian V. Smith):
> >> remotely mounted file system.  In Ultrix 2.3 (and previous) the umask
> > was used in determining the permissions when creating a file, but 
> >> Ultrix 3.0 is ignoring it.
...
> Here is a workaround provided by Jan Sanislo from washington.edu:
> 
> >I belive the problem stems from the fact that the default
> >file creation mask (CMASK in sys/param.h) has been changed
> >from 0 in 2.X to 022 in 3.0.  The nfs daemons (/etc/nfsd) on
> >the server inherit this mask when they are started.
...
> >You should be able to cure the problem by saying "umask 0"
> >before starting up /etc/nfsd in /etc/rc.local.  

Arghh!  What will they think of next? Maybe a hard coded
default ulimit for System V compatibility???    8-)

To improve/alter the system wide default umask (Ultrix 3.0 only)!:

Script started on Sun May 14 22:13:02 1989
# cp /vmunix /vmunix.test
# adb -w /vmunix.test
_main+e5:	cvtlw	$12,7fffebce
?w 0f7
_main+e5:	12f7	=	f7
?i
_main+e5:	cvtlw	$0,7fffebce
^D
#
script done on Sun May 14 22:16:30 1989

You could also change /sys/BINARY.vax/init_main.o or /dev/mem if you prefer...

4.3 BSD does the following to make it an easily accessible global:

init_main.c:
int	cmask = CMASK;
...
main(firstaddr)
...
	u.u_cmask = cmask;

In the Ultrix idiom adding "int cmask = CMASK" to /sys/conf/param.c and
changing init_main.c accordingly would be pretty much equivalent...

-- 
George Robbins - now working for,	uucp: {uunet|pyramid|rutgers}!cbmvax!grr
but no way officially representing	arpa: cbmvax!grr@uunet.uu.net
Commodore, Engineering Department	fone: 215-431-9255 (only by moonlite)