Home > OS >  [for] new into the pit of Linux sprouting new inquire of permissions and CHGRP low-level problem!
[for] new into the pit of Linux sprouting new inquire of permissions and CHGRP low-level problem!

Time:09-29

Study, ladies and gentlemen, the younger brother new to Linux, just started, the question may be lower, please don't blame!

1, the most recent file and directory permissions set, want to ask, if I only need to edit a document, can only give W, I read a book is written in RW
Similarly, if I want to have a directory file permissions operation, in addition to X, can not give R?

2, individual user created files, try to use the CHGRP command modify group, tip error, checked some information on the net, a lot of people said that the command requires the ROOT account, but the man the CHGRP hint this just ordinary users can execute commands, ask questions?

CodePudding user response:

The classification of the permissions
File:
R: - read read permission, can browse the file content cat more less head tail...
W: - write write permissions, can modify the file content vim gedit & gt;>
X: - the execute permissions, the program can run, commands and scripts must be executable permissions, otherwise you won't run,
- : no such permission

Directory:
R: check directory content ls
W: can create within the directory, delete files and directories touch mkdir mv rm...
X: can enter the CD

2, you want to use the CHGRP, should be to root, because you want to modify group, equivalent to add this file to another group, is not the root, there should be no permissions

CodePudding user response:

reference 1st floor zhouchao6 response:
permissions classificationFile:
R: - read read permission, can browse the file content cat more less head tail...
W: - write write permissions, can modify the file content vim gedit & gt;>
X: - the execute permissions, the program can run, commands and scripts must be executable permissions, otherwise you won't run,
- : no such permission

Directory:
R: check directory content ls
W: can create within the directory, delete files and directories touch mkdir mv rm...
X: can enter the CD

2, you want to use the CHGRP, should be to root, because you want to modify group, equivalent to add this file to another group, is not the root, should do not have permission to


Hello, I want to ask next, like I have a directory under the test, to establish a document test. TXT! I want to edit the test. TXT, chmod 100 test/chmod 200 test. TXT can?

CodePudding user response:

reference 2 floor Eddy. Zhu [bailian QuYang] response:
Quote: refer to 1st floor zhouchao6 response:

The classification of the permissions
File:
R: - read read permission, can browse the file content cat more less head tail...
W: - write write permissions, can modify the file content vim gedit & gt;>
X: - the execute permissions, the program can run, commands and scripts must be executable permissions, otherwise you won't run,
- : no such permission

Directory:
R: check directory content ls
W: can create within the directory, delete files and directories touch mkdir mv rm...
X: can enter the CD

2, you want to use the CHGRP, should be to root, because you want to modify group, equivalent to add this file to another group, is not the root, should do not have permission to


Hello, I want to ask next, like I have a directory under the test, to establish a document test. TXT! I want to edit the test. TXT, chmod 100 test/chmod 200 test. TXT can?


I can't, you can try, only 100 x, x is generally used to perform the file, such as the script command, etc., for the average file, x authority doesn't make sense, file access only w, 200 no r permissions, are you can't see the file class capacity, how to change
  • Related