Commonly used · Permissions and links
chmod: Modify permissions
Syntax
chmod [-R] Permissions Path…Options
-R- Recursive modification
Examples
chmod 755 deploy.shUsage and sandbox support
Supports three-digit octal and single-group symbolic expressions, such as u+x, go-r. r=4, w=2, x=1.
Hands-on exercises
- Make the deployment script executableEveryday
- Protect private configurationEveryday
- Authorize the publish scriptAdvanced
- Remove write permissions for other users from the entire directoryMaster
Related commands
chownModify ownerumaskSet new file permission masklnCreate symbolic linkreadlinkView symbolic link targetssudoExecute command as administratorgroupsQuery user groupchgrpModify the group to which the file belongsgetfaclView extended access controlsetfaclSet up extended access controllsattrQuery file attribute flagschattrModify file attribute flagssuSwitch user sessionpasswdChange account passworduseraddcreate AccountusermodModify account propertiesuserdelDelete accountgroupaddCreate user groupgetentQuery system account database