1
Linux : Using the sticky bit to control file permissions
Linux : Using the sticky bit to control file permissions
DATE: 2012/02/18::
2
SADS: SetUid and SetGUID and sticky bit (Linux File Permissions)
SADS: SetUid and SetGUID and sticky bit (Linux File Permissions)
DATE: 2011/06/01::
3
Linux File Permission Sticky Bit
Linux File Permission Sticky Bit
DATE: 2015/02/08::
4
Sticky bit - Permissões especiais no Linux - 02
Sticky bit - Permissões especiais no Linux - 02
DATE: 2013/10/29::
5
What is the use of Sticky Bit in  LINUX
What is the use of Sticky Bit in LINUX
DATE: 2015/03/02::
6
Permisos especiales, Setuid, Setguid, Sticky bit linux.
Permisos especiales, Setuid, Setguid, Sticky bit linux.
DATE: 2014/06/01::
7
Prijs Frank Swaelen: kandidaat
Prijs Frank Swaelen: kandidaat 'Sticky-bit'
DATE: 2015/04/21::
8
Green Laning North Yorkshire Moors - The sticky bit
Green Laning North Yorkshire Moors - The sticky bit
DATE: 2011/08/03::
9
The Shiny Show - Stupid answers: Sticky bit
The Shiny Show - Stupid answers: Sticky bit
DATE: 2014/10/21::
10
Sticky bit Meaning
Sticky bit Meaning
DATE: 2015/04/27::
11
What does sticky bit mean?
What does sticky bit mean?
DATE: 2015/04/17::
12
Sticky Bits - Font presentation through animation - MOTYF
Sticky Bits - Font presentation through animation - MOTYF
DATE: 2014/03/26::
13
Grand Theft Auto V - STICKY BOMB - Part 31
Grand Theft Auto V - STICKY BOMB - Part 31
DATE: 2013/10/25::
14
RETURN OF THE STICKY BOMB! | Road Redemption
RETURN OF THE STICKY BOMB! | Road Redemption
DATE: 2014/09/11::
15
Make Healthy Habits More Sticky | A Little Bit Better With Keri Glassman
Make Healthy Habits More Sticky | A Little Bit Better With Keri Glassman
DATE: 2012/07/30::
16
Minecraft Xbox 360 - TU12 Weird Sticky Piston Glitch ( "Tiny bit of Piston Logic" )
Minecraft Xbox 360 - TU12 Weird Sticky Piston Glitch ( "Tiny bit of Piston Logic" )
DATE: 2013/08/26::
17
BEGINNINGS -featuring STICKY BITS -chronic butterfly
BEGINNINGS -featuring STICKY BITS -chronic butterfly
DATE: 2010/01/20::
18
Grand Theft Auto V | STICKY BOMBS FOR EVERYONE
Grand Theft Auto V | STICKY BOMBS FOR EVERYONE
DATE: 2014/01/05::
19
Foundation (Sticky b2b Scott Garcia) Boiler Room London DJ Set
Foundation (Sticky b2b Scott Garcia) Boiler Room London DJ Set
DATE: 2014/09/05::
20
I AM BREAD Gameplay Part 4 - STICKY STUFF - Let
I AM BREAD Gameplay Part 4 - STICKY STUFF - Let's Play I Am Bread (Gameplay & Commentary)
DATE: 2014/12/06::
21
THE STICKY TAPE CHALLENGE!
THE STICKY TAPE CHALLENGE!
DATE: 2015/03/08::
22
GTA 5 THUG LIFE #73 - STICKY SITUATIONS! (GTA V Online)
GTA 5 THUG LIFE #73 - STICKY SITUATIONS! (GTA V Online)
DATE: 2014/07/09::
23
GTA 5 "STICKY CARS" MOD ( ADHÉRENCE 100% ) - GTA 5 GAMEPLAY
GTA 5 "STICKY CARS" MOD ( ADHÉRENCE 100% ) - GTA 5 GAMEPLAY
DATE: 2015/04/27::
24
(OUTDATED) Sticky Grenades Review (PlanetSide 2)
(OUTDATED) Sticky Grenades Review (PlanetSide 2)
DATE: 2013/03/09::
25
STICKY BANDITS (Grand Theft Auto 5 Online Multiplayer)
STICKY BANDITS (Grand Theft Auto 5 Online Multiplayer)
DATE: 2015/01/31::
26
"PAS OP VOOR STICKY BOMBS!" (Grand Theft Auto 5 Online Funny Jobs)
"PAS OP VOOR STICKY BOMBS!" (Grand Theft Auto 5 Online Funny Jobs)
DATE: 2015/04/25::
27
Sticky Toffee Pudding Recipe - Made Personal by SORTED
Sticky Toffee Pudding Recipe - Made Personal by SORTED
DATE: 2014/04/22::
28
ASMR. The NEW Doughnut Clutch! Sticky Fingers, Tapping, and Crinkles. Binaural Show and Tell
ASMR. The NEW Doughnut Clutch! Sticky Fingers, Tapping, and Crinkles. Binaural Show and Tell
DATE: 2014/12/17::
29
GTA 5 Online Sticky Bomb Glitch - Carlos vs. Stripper, Floating Bong! (GTA 5 Funny Moments)
GTA 5 Online Sticky Bomb Glitch - Carlos vs. Stripper, Floating Bong! (GTA 5 Funny Moments)
DATE: 2014/07/08::
30
Grand Theft Auto V | I LOVE STICKY BOMBS | Moon Gravity + Invincibility
Grand Theft Auto V | I LOVE STICKY BOMBS | Moon Gravity + Invincibility
DATE: 2014/01/07::
31
Weekend List - Sticky, Mall Taman Anggrek
Weekend List - Sticky, Mall Taman Anggrek
DATE: 2015/02/07::
32
Minecraft - How To Make A Sticky Piston Door #1 [Tutorial]
Minecraft - How To Make A Sticky Piston Door #1 [Tutorial]
DATE: 2011/05/04::
33
Destiny Funny Moments - Trolling Montage - Sticky Grenades, Sparrow Madness, Funny Dancing
Destiny Funny Moments - Trolling Montage - Sticky Grenades, Sparrow Madness, Funny Dancing
DATE: 2014/09/20::
34
Above & Beyond feat. Alex Vargas - Sticky Fingers (Pierce Fulton Remix)
Above & Beyond feat. Alex Vargas - Sticky Fingers (Pierce Fulton Remix)
DATE: 2014/06/13::
35
Watch Dogs 32+ CONFIRMED Weapons - Assault Rifles,Snipers,Sticky Bombs & More! (Watch_Dogs)
Watch Dogs 32+ CONFIRMED Weapons - Assault Rifles,Snipers,Sticky Bombs & More! (Watch_Dogs)
DATE: 2014/05/09::
36
8-bit Angry Birds Sticky Note Art
8-bit Angry Birds Sticky Note Art
DATE: 2012/06/30::
37
Sticky Balls with Daniel Radcliffe
Sticky Balls with Daniel Radcliffe
DATE: 2014/04/04::
38
Sticky Honey Lime Chicken Recipe {quick & easy}
Sticky Honey Lime Chicken Recipe {quick & easy}
DATE: 2015/02/20::
39
Above & Beyond - Sticky Fingers feat. Alex Vargas (Lane 8 Remix)
Above & Beyond - Sticky Fingers feat. Alex Vargas (Lane 8 Remix)
DATE: 2014/05/15::
40
The Good Wife - Sticky Content: Episode Recap
The Good Wife - Sticky Content: Episode Recap
DATE: 2014/11/18::
41
STICKY BOMBS?! - GTA 5 funny moments
STICKY BOMBS?! - GTA 5 funny moments
DATE: 2015/02/05::
42
STICKY HANDS CHALLENGE - FIFA 15 #18
STICKY HANDS CHALLENGE - FIFA 15 #18
DATE: 2015/01/21::
43
Robot Dentist - Sticky
Robot Dentist - Sticky
DATE: 2014/10/10::
44
Snipers vs. Stunters #4 (GTA Sticky Bomb Bill)
Snipers vs. Stunters #4 (GTA Sticky Bomb Bill)
DATE: 2015/04/16::
45
Sticky Balls with Channing Tatum (Late Night with Jimmy Fallon)
Sticky Balls with Channing Tatum (Late Night with Jimmy Fallon)
DATE: 2013/02/01::
46
STICKY FINGAZ DON
STICKY FINGAZ DON'T AGE A BIT!
DATE: 2008/07/14::
47
Lotus Leaf Wrapped Sticky Rice (糯米鸡) Lo Mai Gai - Chinese Dim Sum Recipe
Lotus Leaf Wrapped Sticky Rice (糯米鸡) Lo Mai Gai - Chinese Dim Sum Recipe
DATE: 2014/01/04::
48
Sticky Notes
Sticky Notes
DATE: 2013/07/07::
49
A Sticky Situation
A Sticky Situation
DATE: 2015/04/15::
50
The Blue Lagoon (4/8) Movie CLIP - Sticky Kiss (1980) HD
The Blue Lagoon (4/8) Movie CLIP - Sticky Kiss (1980) HD
DATE: 2012/10/25::
NEXT >>
RESULTS [51 .. 101]
From Wikipedia, the free encyclopedia
Jump to: navigation, search

In computing, the sticky bit is a user ownership access right flag that can be assigned to files and directories on Unix-like systems.

When a directory's sticky bit is set, the filesystem treats the files in such directories in a special way so only the file's owner, the directory's owner, or root user can rename or delete the file. Without the sticky bit set, any user with write and execute permissions for the directory can rename or delete contained files, regardless of the file's owner. Typically this is set on the /tmp directory to prevent ordinary users from deleting or moving other users' files.

Sticky bit, as a feature, was introduced in 4.3BSD in 1986 and today it is found in most modern Unix-like systems.

History[edit]

The sticky bit was introduced in the Fifth Edition of Unix (in 1974) for use with pure executable files. When set, it instructed the operating system to retain the text segment of the program in swap space after the process exited. This speeds up subsequent executions by allowing the kernel to make a single operation of moving the program from swap to real memory. Thus, frequently-used programs like editors would load noticeably faster. One notable problem with "sticked" programs was replacing the executable (for instance, during patching); to do so required removing the sticky bit from the executable, executing the program and exiting to flush the cache, replacing the binary executable, and then restoring the sticky bit.

Currently, this behavior is only operative in HP-UX and UnixWare. Solaris appears to have abandoned this in 2005.[citation needed] The 4.4-Lite release of BSD retained the old sticky bit behavior, but it has been subsequently dropped from OpenBSD (as of release 3.7) and FreeBSD (as of release 2.2.1). No version of Linux has ever supported this traditional behavior.

Usage[edit]

The most common use of the sticky bit is on directories residing within filesystems for Unix-like operating systems. When a directory's sticky bit is set, the filesystem treats the files in such directories in a special way so only the file's owner, the directory's owner, or root can rename or delete the file. Without the sticky bit set, any user with write and execute permissions for the directory can rename or delete contained files, regardless of the file's owner. Typically, this is set on the /tmp directory to prevent ordinary users from deleting or moving other users' files. This feature was introduced in 4.3BSD in 1986, and today it is found in most modern Unix-like systems.

In addition, Solaris (as of Solaris 2.5) defines special behavior when the sticky bit is set on non-executable files: those files, when accessed, will not be cached by the kernel. This is usually set on swap files to prevent access on the file from flushing more important data from the system cache. It is also used occasionally for benchmarking tests.[citation needed]

The sticky bit is also set by the automounter to indicate that a file has not been mounted yet. This allows programs like ls to ignore unmounted remote files.

Operating System Excerpt from man pages regarding the sticky bit's effect on files
AIX 5.2 For directories, indicates that only file owners can link or unlink files in the specified directory. For files, sets the save-text attribute.[1]
Solaris 11 If a regular file is not executable and has S_ISVTX set, the file is assumed to be a swap file. In this case, the system's page cache will not be used to hold the file's data. If the S_ISVTX bit is set on any other file, the results are unspecified. If a directory is writable and has S_ISVTX (the sticky bit) set, files within that directory can be removed or renamed only if one or more of the following is true (see unlink(2) and rename(2)): the user owns the file, the user owns the directory, the file is writable by the user, the user is a privileged user.[2]
HP-UX [...] prevents the system from abandoning the swap-space image of the program-text portion of the file when its last user terminates. Then, when the next user of the file executes it, the text need not be read from the file system but can simply be swapped in, thus saving time.[3]
Linux [...] the Linux kernel ignores the sticky bit on files. [...] When the sticky bit is set on a directory, files in that directory may only be unlinked or renamed by root or the directory owner or the file owner.[4]
FreeBSD The FreeBSD VM system totally ignores the sticky bit (ISVTX) for executables. If mode ISVTX (the `sticky bit') is set on a directory, an unprivileged user may not delete or rename files of other users in that directory.[5]
IRIX If the sticky bit, S_ISVTX, is set on a file that is a dynamic loader for an ELF executable, then when the executable is execed the old process's read only address spaces will be made available to the dynamic loader in the new process. This can improve program start up time considerably. The setting of the sticky bit on any other file has no effect.[6]
Mac OS X (Leopard) The ISVTX (the sticky bit) has no effect on executable files. All optimization on whether text images remain resident in memory is handled by the kernel's virtual memory system. A directory whose 'sticky bit' is set becomes an append-only directory, or, more accurately, a directory in which the deletion of files is restricted. A file in a sticky directory may only be removed or renamed by a user if the user has write permission for the directory and the user is the owner of the file, the owner of the directory, or the super-user. This feature is usefully applied to directories such as /tmp which must be publicly writable but should deny users the license to arbitrarily delete or rename each other's files. Any user may create a sticky directory.[7]
NetBSD The sticky bit can be set on files, but without any effect. It is reserved for future use.[8]
OpenBSD STICKY FILES

Historically, an executable shareable file which had the sticky bit set was not immediately discarded from swap space after execution. The kernel hoarded the text segment of the file for future reuse, thus avoiding having to reload the program. This is no longer true on modern systems; the current virtual memory system keeps track of recently used executables, making the sticky bit for files redundant. The sticky bit can still be set on files, but without any effect.

Only the superuser can set the sticky bit on a file, though the owner of the file may clear the sticky bit.

STICKY DIRECTORIES

A directory with the `sticky bit' set places restrictions on file deletion: a file in a sticky directory may only be removed or renamed by a user if the user has write permission for the directory and the user is the owner of the file, the owner of the directory, or the superuser. This feature is usefully applied to directories such as /tmp which must be publicly writable but should deny users the license to arbitrarily delete or rename each other's files.

Any user may create a sticky directory. See chmod(1) for details about modifying file modes.[9]

SCO UnixWare If a 0410 a.out executable file has the sticky bit (mode bit 01000) set, the operating system will not delete the program text from the swap area when the last user process terminates. If a 0413 a.out or ELF executable file has the sticky bit set, the operating system will not delete the program text from memory when the last user process terminates. In either case, if the sticky bit is set the text will already be available (either in a swap area or in memory) when the next user of the file executes it, thus making execution faster.[10]

Examples[edit]

The sticky bit can be set using the chmod command and can be set using its octal mode 1000 or by its symbol t (s is already used by the setuid bit). For example, to add the bit on the directory /usr/local/tmp, one would type chmod +t /usr/local/tmp. Or, to make sure that directory has standard tmp permissions, one could also type chmod 1777 /usr/local/tmp.

To clear it, use chmod -t /usr/local/tmp or chmod 0777 /usr/local/tmp (the latter will also reset the tmp directory to standard permissions).

In Unix symbolic file system permission notation, the sticky bit is represented by the letter t in the final character-place. For instance, on Solaris 8, the /tmp directory, which by default has the sticky-bit set, shows up as:

  $ ls -ld /tmp
  drwxrwxrwt   4 root     sys          485 Nov 10 06:01 /tmp

If the sticky-bit is set on a file or directory without the execution bit set for the others category (non-user-owner and non-group-owner), it is indicated with a capital T:

  # ls -l test
  -rw-r--r--   1 root     other          0 Nov 10 12:57 test
  # chmod +t test; ls -l test
  -rw-r--r-T   1 root     other          0 Nov 10 12:57 test

See also[edit]

References[edit]

  1. ^ http://moka.ccr.jussieu.fr/doc_link/en_US/a_doc_lib/cmds/aixcmds1/chmod.htm
  2. ^ "Synopsis - man pages section 2: System Calls". Docs.oracle.com. 2011-11-01. Retrieved 2014-04-10. 
  3. ^ [1][dead link]
  4. ^ "chmod(1) - Linux manual page". Man7.org. Retrieved 2014-04-10. 
  5. ^ "chmod - FreeBSD". Nixdoc.net. 1993-06-04. Retrieved 2014-04-10. 
  6. ^ "chmod - IRIX/standard/". Nixdoc.net. Retrieved 2014-04-10. 
  7. ^ "Mac Developer Library". Developer.apple.com. Retrieved 2014-04-10. 
  8. ^ "sticky - NetBSD Manual Pages". Netbsd.gw.com. 2011-05-10. Retrieved 2014-04-10. 
  9. ^ "Manual Pages: sticky". Openbsd.org. 2014-02-14. Retrieved 2014-04-10. 
  10. ^ "chmod(2)". Uw714doc.sco.com. 2004-04-25. Retrieved 2014-04-10. 

External links[edit]

Wikipedia content is licensed under the GFDL License
Powered by YouTube
MASHPEDIA
LEGAL
  • Mashpedia © 2015