Beginning the Linux Command Line by Sander van Vugt
Author:Sander van Vugt
Language: eng
Format: epub, pdf
ISBN: 9781430268307
Publisher: Apress
Notice that this means that sticky bit cannot be used to prevent users to remove files from their home directory. As the user is owner of the home directory, the user will always have permissions to remove files from this directory.
When using ls -l, you can see sticky bit as a t at the position where you normally see the execute permission for others:
nuuk:/groups # ls -ld account/
drwxr-sr-t 2 root account 4096 Dec 14 15:17 account/
Applying Advanced Permissions
To apply SUID, SGID, and sticky bit, you can use chmod as well. SUID has numerical value 4, SGID has numerical value 2, and sticky bit has numerical value 1. If you want to apply these permissions, you need to add a four-digit argument to chmod, of which the first digit refers to the special permissions. The following line, for example, would add the SGID permission to a directory, and set rwx for the user and rx for the group and others:
chmod 2755 /somedir
It is rather impractical if you have to look up the current permissions that are set before working with chmod in absolute mode (you would risk overwriting permissions if you didn’t). Therefore, I recommend working in relative mode if you need to apply any of the special permissions. For SUID, use chmod u+s; for SGID, use chmod g+s; and for sticky bit, use chmod +t followed by the name of the file or the directory that you want to set the permissions on.
Table 7-3 presents all you need to know about these special permissions.
Table 7-3. Working with SUID, SGID, and Sticky Bit
Download
Beginning the Linux Command Line by Sander van Vugt.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7742)
Filmora Efficient Editing by Alexander Zacharias(5453)
The Infinite Retina by Robert Scoble Irena Cronin(4900)
Linux Device Driver Development Cookbook by Rodolfo Giometti(3906)
Learn Wireshark - Fundamentals of Wireshark. by Lisa Bock(3791)
Edit Like a Pro with iMovie by Regit(3243)
Linux Administration Best Practices by Scott Alan Miller(2844)
Linux Command Line and Shell Scripting Techniques by Vedran Dakic & Jasmin Redzepagic(2821)
MCSA Windows Server 2016 Study Guide: Exam 70-740 by William Panek(2509)
Docker on Windows by Stoneman Elton(2308)
Kali Linux - An Ethical Hacker's Cookbook: End-to-end penetration testing solutions by Sharma Himanshu(2297)
Mastering PowerShell Scripting - Fourth Edition by Chris Dent(2221)
Hands-On AWS Penetration Testing with Kali Linux by Karl Gilbert(2096)
Creative Projects for Rust Programmers by Carlo Milanesi(2050)
Hands-On Linux for Architects by Denis Salamanca(2031)
Computers For Seniors For Dummies by Nancy C. Muir(1985)
Programming in C (4th Edition) (Developer's Library) by Stephen G. Kochan(1975)
The Old New Thing by Raymond Chen(1929)
Linux Kernel Debugging by Kaiwan N Billimoria(1754)
