Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!clyde.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!usc!wuarchive!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!ncoast!allbery From: allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) Newsgroups: comp.unix.internals Subject: Re: What does SUID, SGID and Sticky bits do on inappropriate files? Message-ID: <1990Dec26.011025.4186@NCoast.ORG> Date: 26 Dec 90 01:10:25 GMT References: <1990Dec25.032451.25017@gpu.utcs.utoronto.ca> <1990Dec25.155758.8227@mp.cs.niu.edu> Reply-To: allbery@ncoast.ORG.ORG (Brandon S. Allbery KB8JRR) Followup-To: comp.unix.internals Organization: North Coast Computer Resources (ncoast) Lines: 31 As quoted from <1990Dec25.155758.8227@mp.cs.niu.edu> by rickert@mp.cs.niu.edu (Neil Rickert): +--------------- | In article <1990Dec25.032451.25017@gpu.utcs.utoronto.ca> jmason@gpu.utcs.utoronto.ca (Jamie Mason) writes: | > Also what are the effects of the Set-User-ID and Set-Group-ID | >bits on files which cannot be properly said to be *EXECUTED*? (Though the X | >permissions are set) For instance Directories, but also the other types | >of special files named above? | > | Recent versions of 'sendmail' use the suid/sgid bits when mailing to a +--------------- This is also done by System V at/cron to make sure that crontabs and at job files aren't "usurped" by someone else, since chown clears setuid/setgid. This of course is an aspect of System V's permissive chown rules, about which see threads elsewhere (I decline to comment). Some SCO Xenix, SCO "UNIX", and possibly SVR3.2 use setgid on non-executables to indicate that normally cooperative file locking should actually be mandatory. The SCO "UNIX" systems at work do not use g+s on files, however; the command used is "chown +l". SunOS and maybe other Unixes use g+s on a directory to produce sticky gid's: files created in the directory inherit the directory's gid instead of the creating process's egid. ++Brandon -- Me: Brandon S. Allbery VHF/UHF: KB8JRR on 220, 2m, 440 Internet: allbery@NCoast.ORG Packet: KB8JRR @ WA8BXN America OnLine: KB8JRR AMPR: KB8JRR.AmPR.ORG [44.70.4.88] uunet!usenet.ins.cwru.edu!ncoast!allbery Delphi: ALLBERY