Linux File and Directory special permission - rwxst
File permission
r: Readable, allows to view the file content with cat command;
w: Writable, allows to edit or delete the file;
x: Executable, allows to submit to the kernel as a command.
Directory permission
r: Allows to execute ls command in this directory to list all internal files.
w: Allows to create files in this directory.
x: Allows to use cd command to switch to this directory, or use ls -l to view detailed information of internal files.
Special permission
chmod u+s xxx # Sets setuid permission.
chmod g+s xxx # Sets setgid permission.
chmod o+t xxx # Sets stick bit permission, applicable to directories.
chmod 4775 xxx # Sets setuid permission.
chmod 2775 xxx # Sets setgid permission.
chmod 1775 xxx # Sets stick bit permission, applicable to directories.
Back to Table of Contents
Disclaimer
- License under
CC BY-NC 4.0
- Copyright issue feedback
me#imzye.com
, replace # with @ - Not all the commands and scripts are tested in production environment, use at your own risk
- No personal information is collected.
Feedback