symbolic mode
A chmod permission change written as who, operator and rights, such as u+x or go-w.
In more detail
It changes only the rights you name and leaves the rest alone, which makes it safer than a numeric mode for small adjustments. = sets exactly the rights given for those classes.
Examples
chmod u+x notes.txtchmod a=r notes.txtIt names the class (u, g, o or a), the operation (+ add, - remove, = set exactly) and the permissions. Because it changes only what you name, it is safer in a runbook than replacing every bit with a guessed octal number. Inspect the resulting mode afterwards.before=640 change=g+w after=660 shows group write added while others stay unable to write.Related terms
- chmod — A command that changes a file's permission bits, using either octal digits or symbolic changes.
- numeric mode — A permission setting written as three digits, one each for owner, group and others, where read is 4, write 2 and execute 1.
- owner, group and others — The three sets of people a Unix file's permissions are written for: its owning user, its group, and everyone else.
- octal mode — Writing a file mode as base-8 digits, one per class, where each digit is the sum of read 4, write 2 and execute 1.
- file mode — The set of permission bits stored with each file that says what the owner, the group and everyone else may do with it.
- permission class — One of the three audiences a file mode gives separate permissions to: the owner (u), the owning group (g) and everyone else (o).
Taught in
- Permissions And Ownership — Bash Scripting & Command Line Automation
- Reading And Setting A File Mode — Linux Fundamentals & Systems Administration