If you can see this check that

next section prev section up prev page next page

How to change existing permissions symbolically

After you have determined what permissions are in effect, you can change them by executing the command chmod (change mod). chmod has two options; symbolic mode (using alphabetic characters) and absolute mode (uses numbers).

First of all we will deal with symbolic mode. In this mode the command is used with the following syntax:

chmodwho+permissionfilename
chmodwho-permissionfilename
chmodwho=permissionfilename

WHO represents one or a combination of three classes (u,g, or o) where u is for user (owner), g is for group, and o is for other. The use of '+' allows us to add permissions to those already in existence, where as '-' removes permissions from those currently in use. '=' set the permissions specified and removes any permissions which are not mentioned explicitly. Permission is any combination of r, w, and x. Finally filename is the name of a file or directory. Note that there is no space between the arguments who[+-=]permission.

For example, assume 'myfile' has the following default permissions:

-rwxr-----.  1 john staff 500 Nov 18 12:25 myfile
If we wished to give the group 'staff' write access to 'myfile' we could use the following command:
% chmod g+w myfile
% ls -l myfile
-rwxrw----.  1 john staff 500 Nov 18 12:25 myfile

Centos 7 intro: Paths | BasicShell | Search
Linux tutorials: intro1 intro2 wildcard permission pipe vi essential admin net SELinux1 SELinux2 fwall DNS diag Apache1 Apache2 log Mail
Caine 10.0: Essentials | Basic | Search | Acquisition | SysIntro | grep | MBR | GPT | FAT | NTFS | FRMeta | FRTools | Browser | Mock Exam |
Caine 13.0: Essentials | Basic | Search | Acquisition | SysIntro | grep | MBR | GPT | FAT | NTFS | FRMeta | FRTools | Browser | Mock Exam |
CPD: Cygwin | Paths | Files and head/tail | Find and regex | Sort | Log Analysis
Kali: 1a | 1b | 1c | 2 | 3 | 4a | 4b | 5 | 6 | 7a | 8a | 8b | 9 | 10 |
Kali 2020-4: 1a | 1b | 1c | 2 | 3 | 4a | 4b | 5 | 6 | 7 | 8a | 8b | 9 | 10 |
Useful: Quiz | Forums | Privacy Policy | Terms and Conditions

Linuxzoo created by Gordon Russell.
@ Copyright 2004-2024 Edinburgh Napier University