[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: what is the sticky bit?

On Wed, 1 Oct 1997, Peter Iannarelli wrote:

: Paul Miller wrote:
: > 
: > I know this is a really stupid question.. but what is the sticky bit?
: > 
: > -Paul
: The sticky bit allows a UID to be the owner of a file while
: that file is being accessed by that user. In essence if a user
: opens a file, that user will be the owner of that file until
: it is closed. After closing, the file goes back to its original
: state.
: **** I THINK ****
: Peter

The "sticky bit" came into existence when memory sizes were quite small
and swapping was _very_ common.  Some programs were used frequently
enough (eg. vi) that swapping thjose programs out was clearly
undesirable.  The sticky bit was coded to indicate to the OS that the
program should remain (or "stick") in memory.

Currently, the sticky bit is most frequently used as a directory
permission.  Normally, if a user has write permission to a directory,
they may delete any file within that directory.  Note that the user does
not have to have write permissions to the _file_, nor do they need to be
the owner.  This is undesireable behavior for a directory such as /tmp.

When the sticky bit is set for a directory, a user may delete files he
owns.  He may not delete files belonging to others.  This prevents a
user from causing havoc with, say, another users editor sessions.


Nathan Norman
410 South Phillips Avenue
Sioux Falls, SD  57104
Voice: (605) 334-4454 Fax: (605) 335-1173
email: nnorman@midco.net or  nathan_norman@mmi.net

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: