Permission and file editing commands

Permission and file editing commands

The second line represent the security as --------- 

---     ---     ---

rwx     rwx     rwx

user    group   other

r- mean read

w- Mean write

x- mean execute

If we replace rwx by --- then all permission will be revoked.

u→ user, g→ group and o→ other

If want change permission of file with user/group and others level

Like chmod u/g/o or ugo+/-(+ for adding)(-for revoking permission) fileName

We will go though the following given steps

  1. First step of chmod then ‘u’,g’,’o’ you can also used the combined permission of file using ugo i.e. chmod ugo
  2. After above step we will use the + for add permission - for revoke permission and = assigning permission
  3. Then specify permission of r,w and x which you want to change.
  4. The user can use commons to modify more permission.
  5. Finally name of the file.

Example:

  • chmod ugo+rwx testfile.txt
  • chmod ug+rwx,o-rwx testfile.txt
  • chmod go+rwx,u-rwx testfile.txt
  • chmod 777 testfile.txt
  • chmod -777 testfile.txt
  • chmod =777 testfile.txt


To view or add a comment, sign in

Others also viewed

Explore topics