Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!wa4mei!holos0!lbr From: lbr@holos0.uucp (Len Reed) Newsgroups: comp.unix.misc Subject: Re: Sticky bit? Keywords: sticky, directory Message-ID: <1991Mar27.150435.13311@holos0.uucp> Date: 27 Mar 91 15:04:35 GMT References: <6704@navy28.UUCP> <1991Mar24.223426.10401@cs.umu.se> Organization: Holos Software, Inc., Atlanta, GA Lines: 41 In article <1991Mar24.223426.10401@cs.umu.se> dvldbg@cs.umu.se (Daniel Brahneborg) writes: >The sticky bit is used for changing the user-id of the process that >runs the program, such as 'su', and lots of others. I'll be charitable and assume that this was a mental slip and not really and indication that you don't know what you're talking about. What you say is certainly wrong. You've just described the set-uid bit, though a complete explanation of that bit would require that you say what the user id is changed to and a brief description of effective versus real user ids. I don't understand why persons post erroneous answers to simple questions. Again, perhaps this wrong answer was a mental slip, but others have posted wrong answers to this question that show, without a doubt, they don't know what they're talking about. The sticky bit goes back to at least edition 6 Unix; we're talking the 1970s here. In a classic sense it applicable only to executables--not even shell scripts. It can be set only by the superuser. It says that when the last process executing this inode dies, do *not* discard the sharable text from the swap area, but keep it in the swap area. When someone later exec's the program, the kernel doesn't have to load the text from the file, only the initialized data. This allegedly speeds startup of progams that are used frequently (e.g., vi). It has no effect on programs that the shell that tend to always have one or more processes running them. The meaning is expandable to systems with paging virtual memory: retain the sharable pages. The sticky bit (and the setuid and setgid bits, for that matter) have been appropriated for various uses on BSD and perhaps other systems; others have written about these uses. My description of the sticky bit is the only one applicable to "Unix" in general. -- Len Reed Holos Software, Inc. Voice: (404) 496-1358 UUCP: ...!gatech!holos0!lbr