Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!bu.edu!purdue!haven!mimsy!mojo!mojo!djm From: djm@eng.umd.edu (David J. MacKenzie) Newsgroups: comp.unix.internals Subject: Re: What does SUID, SGID and Sticky bits do on inappropriate files? Message-ID: Date: 25 Dec 90 17:55:01 GMT References: <1990Dec25.032451.25017@gpu.utcs.utoronto.ca> Sender: news@eng.umd.edu (C-News) Organization: Project GLUE, University of Maryland Lines: 22 In article bzs@world.std.com (Barry Shein) writes: > Interestingly, on SunOS 4.x I can't even set the sticky bit on plain > or executable files (thinking it was the utilities ls and/or chmod > fighting with me I wrote a quick hack to do it thru chmod() and read > it back with stat(), no dice, never got set.) I was able to set the > sticky and setid bits on a device file though. Regular users can't, but the superuser can. egypt# id uid=0(root) gid=1(daemon) groups=1(daemon),10(staff),12(pr-cntl) egypt# cp /dev/null xyzzy egypt# ls -l xyzzy -rw-r--r-- 1 root staff 0 Dec 25 12:53 xyzzy egypt# chmod 1644 xyzzy egypt# ls -l xyzzy -rw-r--r-T 1 root staff 0 Dec 25 12:53 xyzzy egypt# chmod 1755 xyzzy egypt# ls -l xyzzy -rwxr-xr-t 1 root staff 0 Dec 25 12:53 xyzzy -- David J. MacKenzie