Permission for user, group and others in Linux platform
UGO Mode permission
In Linux for any directory or there are three types off
permission you can provide,
1) Read
2) Write
3) Execute
If a directory have read permission then you can read the
content of the directory, if the directory has write permission then you
can edit the content of the directory, if the directory has execute permission
then you can run that directory if it is a program directory.
Read permission is indicated by “r”,
write permission is indicated by “w” and execute permission is indicated by
“x”. All these three permission can be given to three types of entities – User,
Group and Others. User is the creator or owner of any particular file or
directory. Group is a collection of user who has the same rights and community
as the owner. Others are the collection of those users who do not belong to the
group of the owner. User is indicated by “u” Group is indicated by “g”, others are
indicated by “o”.
To provide permission use “+”and to take away permission
use “-“permission can be given or withdrawn by the”chmod”
command.
# chmod (space) u/g/o (space) +/- r/w/x (space)
file/directory
Example:
#chmod u + r testfolder ( to grant read permission for user)
#chmod g + w testfolder ( to grant write permission for group)
#chmod o + x testfolder ( to grant execute permission for others)
#chmod u - r testfolder ( to revoke read permission from particular
directory to user)
#chmod g - w testfolder (to revoke write permission from particular
directory to user)
#chmod o - x testfolder (to revoke execute permission from particular
directory to user)
Comments
Post a Comment