How To Change File or Directories On Linux 2
2. Change by Group
Use this permission file for Example (-rw-rw-r–) from this permission it mean :
File owner can read and write can not to execute.
User in owner group can read and write, but can not to execute.
Other user out of this group can read only.
About File permission
- r can read.
- w can write.
- x can execute.
Group of person
- u file owner.
- g user in group of file owner.
- o other user out of group file owner.
- a all 3 groups
For this Example will use + and – for add and delete permission.
Exam : If you want to change all users and groups can execute this file (yourfile.txt) you need to use command as below :
#chmod a+x yourfile.txt
Exam : If you want to set owner and group can execute this file use the command :
#chmod ug+x yourfile.txt
Options for chmod command
- c you can see result after use this command on display.
- R use this option for change permission to all subdirectory or all files in subdirectory.






