Altering File Permissions with chmod
You can use the chmod
command to alter a file’s permissions. This command uses various forms of command syntax, including octal or a mnemonic form (such as u
, g
, o
, or a
and rwx
, and so on) to specify a desired change. You can use the chmod
command to add, remove, or modify file or directory permissions to protect, hide, or open up access to a file by other users (except for the root account or a user with super user permission and using sudo, either of which can access any file or directory on a Linux system).
The mnemonic forms of chmod
’s options are (when used with a plus character, +
, to add, or a minus sign, -
, to remove):
u—Adds or removes user (owner) read, write, or execute permission.
g—Adds or ...
Get Ubuntu Unleashed 2015 Edition: Covering 14.10 and 15.04, Tenth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.