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, 2019 in Linux Administration by Jishan
81 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, 2019 by John

Related Questions In Linux Administration

0 votes
1 answer

How to check permissions of a file in the Linux system?

Hi@akhtar, If you prefer using the command line, ...READ MORE

answered Aug 13 in Linux Administration by MD
• 54,560 points
61 views
0 votes
1 answer

How to check permissions of a folder in the Linux system?

Hi@akhtar, You can use ls command to check ...READ MORE

answered Aug 13 in Linux Administration by MD
• 54,560 points
63 views
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, 2019 in Linux Administration by Ritesh Singh
13,020 views
–1 vote
1 answer

How to get octal file permission in linux?

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

answered Jan 3, 2019 in Linux Administration by Omkar
• 69,030 points
371 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
181 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, 2019 in Others by Nabarupa
54 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, 2019 in Linux Administration by Shubham
• 13,450 points
4,414 views
0 votes
1 answer

Linux: Efficiently test if a port is Open

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

answered Jun 12, 2019 in Linux Administration by Shubham
• 13,450 points
82 views