The sticky bit was first introduced in 1974 within the UNIX operating system. Its purpose was to instruct the operating system to place the process into swap once completed. Thus reducing the startup time of the process during further executions. However nowdays this usage is obsolete.
Instead, the sticky bit is now set on a directory. With the intention to limit only the directory owner, the item owner or root to rename or delete any child items.
The sticky bit is represented by either a ‘t’ or ‘T’ and is displayed within the execute permission section for ‘others’.
[root@server ~]# ls -ld /tmp drwxrwxrwt 11 root root 4096 Oct 24 22:09 /tmp
Difference between T`s
So you may be asking. What is the difference between ‘t’ and ‘T’ ?
A lowercase ‘t’ represents the “x” being unset, whereas ‘T’ represents the ‘x’ being unset.
-rwxrwxrwt - sticky bit and others execute bit set -rwxrwxr-T - sticky bit is set and others execute bit is not set
To configure sticky on a directory the following command is used.
[root@server ~]# chmod +t /tmp/test/ [root@server ~]# ls -ld /tmp/test/ drwxrwxrwt 11 root root 4096 Oct 24 22:09 /tmp/test
- How to Configure a BIND Server on Ubuntu - March 15, 2018
- What is a BGP Confederation? - March 6, 2018
- Cisco – What is BGP ORF (Outbound Route Filtering)? - March 5, 2018
Want to become a UNIX expert?
Here is our hand-picked selection of the best courses you can find online:
UNIX Administration Fundamentals
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial