Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Linux Fedora: File Permissions

Most current file systems have methods of assigning permissions or access


rights to specific users and groups of user. These systems control the ability of
the users to view or make changes to the contents of the file system.
Permission Groups
Three user based permission groups
Owner- the owner permission applies only on the owner of the file or
directory, other users will not access the file
Group- files that can be accessed to the group assigned by the owner
All users- can be accessed by all users
Permission Types
Three types of permissions
. !ead- read the contents of a file
". #rite $w% - write or modify a file
&. '(ecute $(% - run or launch a file
File Permission Commands and Symbols
)ile permission symbols
!ead* r
#rite* w
'(ecute * (
+ermission type symbols
Owner* u
Group* g
All users* o or a
!un command,
ls l
'nlists file names together with its file permissions
-ample,
-rw(r- - r - - root root ./0 1an 2 333 cron
chmod command
A command that sets permissions on a file
-ynta(,
chmod permissions filename
chmod pm1_pm2_pm3* filename
4whereas pm represents the Owner permission, pm" represents the group
permission and pm& represents the permission for all the users
'(ample,
chmod rw-r- -r- - testfile
Other file permission syntaxes
5 - no special permissions
d 6 directory
7 - file or directory is a symbolic link
s- indicates setuid7setgid permissions
t 6 indicates the sticky bit permissions.
Binary references to set permissions
8inary values
!*2
#*"
9*
#hereas,
:*2;";$read7write7e(ecute%
/* 2;" $read7write%
0* 2; $read7e(ecute%
2* 2$read%
&*";$write7e(ecute%
"*"$write%
*$e(ecute%
-ample,
chmod 755 test.txt
Which means read write and exec!te for the owner" read and exec!te for #ro!p and all
!sers

You might also like