Skip to main content

SETUID AND SETGID BITS

  chmod clears the set-group-ID bit of a regular file if the file's group ID 
  does not match the user's effective  group  ID or  one  of  the user's 
  supplementary group IDs, unless the user has appropriate privileges.
  Additional restrictions may cause the set-user-ID and set-group-ID bits
  of MODE or RFILE to be ignored.  This behavior  depends  on  the  policy
  and functionality of the underlying chmod system call.  When in doubt,
  check the underlying system behavior.

  chmod  preserves a directory's set-user-ID and set-group-ID bits unless 
  you explicitly specify otherwise.  You can set or clear the bits with 
  symbolic modes like u+s and g-s, and you can set (but not clear) the bits
  with a numeric mode.

chmod clears the set-group-ID bit of a regular file if the file's group ID does not match the user's effective group ID or one of the user's supplementary group IDs, unless the user has appropriate privileges. Additional restrictions may cause the set-user-ID and set-group-ID bits of MODE or RFILE to be ignored. This behavior depends on the policy and functionality of the underlying chmod system call. When in doubt, check the underlying system behavior.

chmod preserves a directory's set-user-ID and set-group-ID bits unless you explicitly specify otherwise. You can set or clear the bits with symbolic modes like u+s and g-s, and you can set (but not clear) the bits with a numeric mode.

RESTRICTED DELETION FLAG OR STICKY BIT

  The restricted deletion flag or sticky bit is a single bit, whose 
  interpretation depends on the file type.  For  directories,  it  
  prevents  unprivileged users from removing or renaming a file in the
  directory unless they own the file or the directory; this is called the 
  restricted deletion flag for the directory, and is commonly found on 
  world-writable  directories  like /tmp.  For regular files on some 
  older systems, the bit saves the program's text image on the swap 
  device so it will load more quickly when run; this is called the sticky
  bit.

The restricted deletion flag or sticky bit is a single bit, whose interpretation depends on the file type. For directories, it
prevents unprivileged users from removing or renaming a file in the directory unless they own the file or the directory; this is called the restricted deletion flag for the directory, and is commonly found on world-writable directories like /tmp. For regular files on some older systems, the bit saves the program's text image on the swap device so it will load more quickly when run; this is called the sticky bit.

SETUID AND SETGID BITS

  chmod clears the set-group-ID bit of a regular file if the file's group ID 
  does not match the user's effective  group  ID or  one  of  the user's 
  supplementary group IDs, unless the user has appropriate privileges.
  Additional restrictions may cause the set-user-ID and set-group-ID bits
  of MODE or RFILE to be ignored.  This behavior  depends  on  the  policy
  and functionality of the underlying chmod system call.  When in doubt,
  check the underlying system behavior.

  chmod  preserves a directory's set-user-ID and set-group-ID bits unless 
  you explicitly specify otherwise.  You can set or clear the bits with 
  symbolic modes like u+s and g-s, and you can set (but not clear) the bits
  with a numeric mode.

RESTRICTED DELETION FLAG OR STICKY BIT

  The restricted deletion flag or sticky bit is a single bit, whose 
  interpretation depends on the file type.  For  directories,  it  
  prevents  unprivileged users from removing or renaming a file in the
  directory unless they own the file or the directory; this is called the 
  restricted deletion flag for the directory, and is commonly found on 
  world-writable  directories  like /tmp.  For regular files on some 
  older systems, the bit saves the program's text image on the swap 
  device so it will load more quickly when run; this is called the sticky
  bit.

SETUID AND SETGID BITS

chmod clears the set-group-ID bit of a regular file if the file's group ID does not match the user's effective group ID or one of the user's supplementary group IDs, unless the user has appropriate privileges. Additional restrictions may cause the set-user-ID and set-group-ID bits of MODE or RFILE to be ignored. This behavior depends on the policy and functionality of the underlying chmod system call. When in doubt, check the underlying system behavior.

chmod preserves a directory's set-user-ID and set-group-ID bits unless you explicitly specify otherwise. You can set or clear the bits with symbolic modes like u+s and g-s, and you can set (but not clear) the bits with a numeric mode.

RESTRICTED DELETION FLAG OR STICKY BIT

The restricted deletion flag or sticky bit is a single bit, whose interpretation depends on the file type. For directories, it
prevents unprivileged users from removing or renaming a file in the directory unless they own the file or the directory; this is called the restricted deletion flag for the directory, and is commonly found on world-writable directories like /tmp. For regular files on some older systems, the bit saves the program's text image on the swap device so it will load more quickly when run; this is called the sticky bit.

Corrected "octet" to "octal". An octet is a group of eight bits, an octal (digit) is made up of three bits.
Source Link

What the above man page is trying to say is that the position that the x bit takes in the rwxrwxrwx for the user octetoctal (1st group of rwx) and the group octetoctal (2nd group of rwx) can take an additional state where the x becomes an s. When this occurs this file when executed (if it's a program and not just a shell script) will run with the permissions of the owner or the group of the file.

What the above man page is trying to say is that the position that the x bit takes in the rwxrwxrwx for the user octet (1st group of rwx) and the group octet (2nd group of rwx) can take an additional state where the x becomes an s. When this occurs this file when executed (if it's a program and not just a shell script) will run with the permissions of the owner or the group of the file.

What the above man page is trying to say is that the position that the x bit takes in the rwxrwxrwx for the user octal (1st group of rwx) and the group octal (2nd group of rwx) can take an additional state where the x becomes an s. When this occurs this file when executed (if it's a program and not just a shell script) will run with the permissions of the owner or the group of the file.

stick-bitsticky bit

The stick-bitsticky bit on the other hand is denoted as a tt, such as with the /tmp directory:

This bit should have always been called the "restricted deletion bit" given that's what it really connotes. When this mode bit is enabled, it makes a directory such that users can only delete files & directories with inwithin it that they are the owners of.

stick-bit

The stick-bit on the other hand is denoted as a t, such as with the /tmp directory:

This bit should have always been called the "restricted deletion bit" given that's what it really connotes. When this mode bit is enabled, it makes a directory such that users can only delete files & directories with in it that they are the owners of.

sticky bit

The sticky bit on the other hand is denoted as t, such as with the /tmp directory:

This bit should have always been called the "restricted deletion bit" given that's what it really connotes. When this mode bit is enabled, it makes a directory such that users can only delete files & directories within it that they are the owners of.

Rollback to Revision 5
Source Link
slm
  • 379.7k
  • 127
  • 793
  • 897
Loading
Loading
"user octet" was repeated
Source Link
slm
  • 379.7k
  • 127
  • 793
  • 897
Loading
added examples
Source Link
slm
  • 379.7k
  • 127
  • 793
  • 897
Loading
Source Link
slm
  • 379.7k
  • 127
  • 793
  • 897
Loading