Before we talk about what is a sticky bit let’s start by explaining why do we need it. For example we have a directory /var/share somewhere on the filesystem with a full access for all permission groups that is owner, group and any, thus all permission bits are set to “on” drwxrwxrwx:
# ls -ld /var/share/ drwxrwxrwx. 2 root root 4096 Mar 5 11:02 /var/share/
From the above, we can see that any user have read, write and execute permissions to the /var/share directory. Next, in our scenario we have two users named user1 and user2. Since everybody now have an access to /var/share directory, our user1 can navigate to this directory and simply create any arbitrary file:
user1@localhost ~]$ cd /var/share/ [user1@localhost share]$ touch file1 [user1@localhost share]$ ls -l file1 -rw-rw-r--. 1 user1 user1 0 Mar 5 11:08 file1 [user1@localhost share]$

