Linux Permissions: Sticky bits

0 votes
Can someone explain me what is a sticky bit for a file permission and how to set it? Thanks
May 21 in Linux Administration by Jishan
17 views

1 answer to this question.

0 votes

You might have come across read, write and execute permission for a file. Similar to this, there is another permission called sticky bit. If a file is assigned with a sticky bit, then only that owner can delete that file even though other users have write permission. 

You can assign sticky bit as follows:

$ chmod 1777 <filename>

Here, the digit 1 indicates the sticky bit

or you can assign it like this:

$ chmod +t <filename>
answered May 21 by John

Related Questions In Linux Administration

0 votes
2 answers

How do I find all files containing specific text on Linux?

grep -rnw 'text to find recursively inside ...READ MORE

answered May 20 in Linux Administration by Ritesh Singh
3,641 views
0 votes
1 answer

How to get octal file permission in linux?

You can use this: stat -c "%a %n" ...READ MORE

answered Jan 3 in Linux Administration by Omkar
• 67,290 points
78 views
0 votes
1 answer

How to create a symlink in Linux?

To create a symbolic link, you can ...READ MORE

answered Jan 31 in Linux Administration by Omkar
• 67,290 points
55 views
0 votes
1 answer

How to change permissions of folder and files in folder?

The chmod command is used to set/change the permissions ...READ MORE

answered Jan 31 in Linux Administration by Omkar
• 67,290 points
21 views
0 votes
1 answer
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,240 points
72 views
0 votes
1 answer

Where can I find the details of installed files?

The details of recently and locally installed ...READ MORE

answered Mar 8 in Others by Nabarupa
14 views
0 votes
1 answer
0 votes
1 answer

Linux : Undefined reference to pthread_create

Try this; gcc -pthread -o term term.c READ MORE

answered May 29 in Linux Administration by Shubham
• 13,290 points
97 views
0 votes
1 answer

Linux: Efficiently test if a port is Open

$ nc -z <host> <port>; echo $? Use ...READ MORE

answered Jun 12 in Linux Administration by Shubham
• 13,290 points
22 views