Loading...
Basic Linux

File Permissions

File and Directory Attributes:

Unix/Linux files have 8 attributes that can be seen with ls –ld

[root@comp1 ~]#  ls  -ld  reports

Access Levels:

Access Mode:

Access Modes:

Absolute ModeSymbolic ModeFileDirectory
4rTo displays the contents of the fileTo list the contents of the directory
2wTo modify or append to the fileTo create or remove file and directories
1xTo execute the fileTo enter into the directory

Default Permissions:

FilesDirectory
Created by Rootrw_r_ _r_ _644rwxr_xr_x755
Created by Userrw_rw_r_ _664rwxrwxr_x775

Modifying the Permissions:

[root@comp1 ~]#  chmod  <permissions/weight>  <file/directory>

Options:

Categoryu (owner)g (group) o (others)
Operators+=
Permissionsrwx
Permissions421

Example of Permission – Absolute

 Applying permission to Owner (u), Group (g) and Others (o) on the file reports

Example of Permission – Symbolic:

 Applying permission to Owner (u), Group (g) and Others (o) on the file reports

Leave a Reply

Your email address will not be published. Required fields are marked *