Can anyone expain use of Sticky bit in Linux?

Can anyone expain use of Sticky bit in Linux ?

A sticky bit in Linux is a special permission bit that is only set on a directory by a root user or owner of that directory and only owner or root can have permission to delete or rename the file or directory. No other user has the permission to modify or delete the file.

In short, Sticky Bit permission mainly set on directories to protect directory from a deletion by other users.

1 Like

Stick bit is a who your creating file or dir only root user deleted. but not possible deleted home directory

1 Like

Sticky bit is a permission set by 1000 on any directory, for example /tmp. if a directory has sticky bit permission along with write permission for all. one user can create content in that directory but can’t modify/delete any other user’s content from the same directory.

1 Like

^^ not completely true. Ironically, depending on permissions and settings - you cannot move or modify, but can still delete. See http://www.thegeekstuff.com/2013/02/sticky-bit/ :wink: