From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,aa0a3d1d9349d7ae X-Google-Attributes: gidf678f,public From: Peter Bloecher Subject: Re: sgid directories w/DU4.0? Date: 1996/08/06 Message-ID: <3206DDEB.41C6@eedn.ericsson.se>#1/1 X-Deja-AN: 172385789 references: <4u444b$c0b@gisdev.genasys.com.au> cc: Peter.Bloecher content-type: text/plain; charset=us-ascii organization: Ericsson Eurolab Deutschland GmbH mime-version: 1.0 newsgroups: comp.unix.osf.misc x-mailer: Mozilla 2.02 (X11; I; OSF1 V3.2 alpha) Andrew Congdon wrote: > > Anyone know why it is that if I create a file in /tmp (or /var/tmp) > the file belongs to group "system" which I don't belong to? I could > understand it if the sgid bit was on on the directory but it isn't. > > This "feature" makes it annoying when trying to look at files (eg. > daemon logs) since the umask for our group doesn't include other > permissions. > > Is there some way to change this behaviour? > > I'd also like to enable the sgid permission on directories behaviour > that I am used to on other machines: when creating a directory in a > directory where the sgid bit is on the new directory also has the > sgid bit on. Anyone know how to do this? The file (or directory) is > created in the group set by the directory but the sgid bit is not > propagated unless it is a NFS filesystem! > > -- > Andrew. Set the sys_v_mode "tunable" in your kernel configuration file (under /sys/conf), like in # # enable System V file/directory creation behaviour # sys_v_mode 1 and recompile your kernel (using doconfig -c YOUR_KERNEL_CONFIG_FILE). This will cure both problems. BTW, this is vaguely mentioned in man 2 mkdir and somewhere in the Bookreader documentation. /Peter