Professional Documents
Culture Documents
LinuxFilepermissions Aarjav
LinuxFilepermissions Aarjav
LinuxFilepermissions Aarjav
it is not desirable that all users have access to all files and directories.
(x)
the Directory
For granting the above permissions, users are divided into 3 different
sets
Group : Linux users can be divided in groups and one user can
For eg :
A user level r/w/x permission means only the owner can read, write and
A group level r/w/x permission means only the members of group(s) to which
the owner belongs can read, write and execute the file
the file.
for eg. if u want to give all users in the group of the owner just read
here g stands for group, + stands for giving permission (as against -
so g+r means ?give group read permission?. All users for the owners group
Now if they misbehave and u want to take their read permission away.
The command is the same as above, just substituting the + sign with a minus
sign
here
u : user
g: group
o : others
a : all
+ : give permission
r : read permission
w: write permission
x : execute permission
some user
u : the permissions that the user who owns the file has for it
o : the permissions that users not in the owner?s group have for it
-c : Displays names of only those files whose permissions are being changed
be changed
The chown command is used to change the user and/or group which owns one
The flags used above are same as those used in the chmod command . The
following are the different ways in which this command can be used :
• The username followed by a dot or colon followed by a groupname changes both the user and group ownerships to those specified.
• The username followed by a dot or colon and no groupname changes the
user ownership as specified and changes the group ownership to the specified user's login group.
The
chgrp command
The chgrp command is used to change the group ownership of one or more files
The flags used here are also the same as those in the chmod command. The
changes in ownership are applied to the groupname and the filename specified.