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
11 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
2,274 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,000 points
60 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,000 points
44 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,000 points
18 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,220 points
63 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
12 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
• 12,890 points
29 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
• 12,890 points
16 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.