Sticky Bit Visualizer

<p>A Linux tool to visualize and understand the sticky bit and its effect on directory permissions.</p>

Sticky Bit Visualizer

Read
Write
Execute
Owner
Group
Others
Current Permissions
777
rwxrwxrwx
Command: chmod

What is the Sticky Bit?

The sticky bit is a special permission that can be set on directories (and rarely on files) in Unix/Linux systems. When set on a directory, it allows only the file's owner, the directory's owner, or root to delete or rename files within that directory.

How to Recognize the Sticky Bit

In a directory listing (ls -l), the sticky bit appears as a t or T in the others' execute position:

  • t: Others have execute permission and sticky bit is set (e.g., drwxrwxrwt)
  • T: Others do not have execute, but sticky bit is set (e.g., drwxrwxrwT)

Setting the Sticky Bit

To set the sticky bit on a directory:

chmod +t /path/to/dir

Or numerically (the leading 1 sets the sticky bit):

chmod 1777 /path/to/dir

Where is the Sticky Bit Used?

  • The most common example is /tmp (drwxrwxrwt), allowing all users to write but only delete their own files.
  • Rarely used on files; mostly relevant for directories.

Stay Updated with Linux Tips

Get weekly tutorials, command references, and new tool announcements delivered straight to your inbox.