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
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 ...