2. File and Directory Attributes
-Unix/Linux files have 8 attributes that can be seen with ls –l command.
-rw-r—r-- 1 root root 1229 Aug 20 6:20 reports
si
Note: only the owner or the root can change the permissions.
root@powerpc# ls –l reports
Type
permissions
links owner
Owner’s
primary
group
Date
File
namesSize
3. Access Levels
- rwx rwx rwx
- File
d Directory
l links
Owner
Primary
Group
Others
5. Access Modes
Access Mode File Directory
r 4 To display the content of the file To list the contents of the
directory
w 2 To modify or append to the file To create or remove files of
directories
x 1 To execute the file To enter into the directory
7. Modifying the Permission
Modifying the Permission
[root@power_pc]# chmod <permission/weight> <file/dir>
Options:
Category u(owner) g(group) o(others)
Operators + - =
Permissions r w x
Weight 4 2 1
8. Example of Permission: Absolute
Applying permission to owner(u), group(g) and others(o) on file reports
[root@power_pc]# chmod 754 reports
9. Example of Permission: symbolic
Applying permission to owner(u), group(g) and others(o) on file reports
[root@power_pc]# chmod u=rwx, g=rx o=r reports