|
|
1.1 ! root 1: .\" Copyright (c) 1980 Regents of the University of California. ! 2: .\" All rights reserved. The Berkeley software License Agreement ! 3: .\" specifies the terms and conditions for redistribution. ! 4: .\" ! 5: .\" @(#)sticky.8 6.3 (Berkeley) 5/26/86 ! 6: .\" ! 7: .TH STICKY 8 "May 26, 1986" ! 8: .UC 4 ! 9: .SH NAME ! 10: sticky \- persistent text and append-only directories ! 11: .SH DESCRIPTION ! 12: The ! 13: .I "sticky bit" ! 14: (file mode bit 01000, see ! 15: .IR chmod (2)) ! 16: is used to indicate special treatment ! 17: for certain executable files and directories. ! 18: .SH "STICKY TEXT EXECUTABLE FILES" ! 19: While the `sticky bit' ! 20: is set on a sharable executable file, ! 21: the text of that file will not be removed from the system swap area. ! 22: Thus the file does not have to be fetched from the file system ! 23: upon each execution. ! 24: Shareable text segments are normally placed ! 25: in a least-frequently-used cache after use, ! 26: and thus the `sticky bit' has little effect on commonly-used text images. ! 27: .PP ! 28: Sharable executable files are made by the ! 29: .B \-n ! 30: and ! 31: .B \-z ! 32: options of ! 33: .IR ld (1). ! 34: .PP ! 35: Only the super-user can set the sticky bit ! 36: on a sharable executable file. ! 37: .SH "STICKY DIRECTORIES" ! 38: A directory whose `sticky bit' is set ! 39: becomes an append-only directory, or, more accurately, ! 40: a directory in which the deletion of files is restricted. ! 41: A file in a sticky directory may only be removed or renamed ! 42: by a user if the user has write permission for the directory and ! 43: the user is the owner of the file, the owner of the directory, ! 44: or the super-user. ! 45: This feature is usefully applied to directories such as /tmp ! 46: which must be publicly writable but ! 47: should deny users the license to arbitrarily ! 48: delete or rename each others' files. ! 49: .PP ! 50: Any user may create a sticky directory. ! 51: See ! 52: .IR chmod (1) ! 53: for details about modifying file modes. ! 54: .SH BUGS ! 55: Since the text areas of sticky text executables are stashed in the swap area, ! 56: abuse of the feature can cause a system to run out of swap. ! 57: .PP ! 58: Neither ! 59: .IR open (2) ! 60: nor ! 61: .IR mkdir (2) ! 62: will create a file with the sticky bit set.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.