Now view information for a file
[Email protected]:/home/songl/test# ls-l A.18565 may 5: A. Out
| -Rwx rwx R-x |
1 |
Songl |
Songl |
8565 5 07:45 |
A.out |
| File Permissions and Types |
Inode Connection Number |
Owner |
Owning user group |
Time |
Filename |
| Change Directive chmod |
|
More the directive Chown |
More the directive CHGRP |
|
|
Generally, the identity of the Access file is:
1, the owner of the file (owner)
2. User groups (group)
3. Others (Others)
| - |
Rwx |
Rwx |
R-x |
| Represents a file |
Owner Permissions |
Owning user rights |
Other user rights |
Ways to change file properties:
1,Chgrp [-r] Dir/file change the user group that the file belongs to, plus-R is updated with all files and directories under the subdirectory
2,Chown [-r] Dir/file change the owner of the file, plus-R is updated with all files and directories under the subdirectory
3,CHOMD [-r] ABC Dir/file change read and write execution rights for different users
[Email protected]:/home/songl/test# ls-l A. out-rwxrwxr-x1Songl Songl8565May5 -: $A. out[email protected]:/home/songl/test# chmod g-w A. out[email protected]:/home/songl/test# ls-l A. out-rwxr-xr-x1Songl Songl8565May5 -: $A. out[email protected]:/home/songl/test# Chown Root A. out[email protected]:/home/songl/test# ls-l A. out-rwxr-xr-x1Root Songl8565May5 -: $A. out[email protected]:/home/songl/test# Chgrp Root A. out[email protected]:/home/songl/test# ls-l A. out-rwxr-xr-x1Root root8565May5 -: $A. out
Linux file permissions