Whereis // find a directory of commands, such as Whereis Curl ls ls-mkdir-chown- chmod777 directory name 777 is the full permission, 1 performs 2 reads 4 writes all has is 7 chmod +x adds the executable one method
File Permission Explanation:
The first bit (left number) in the drwxr-xr-x indicates whether the current directory is a directory or a file, D represents a directory, and-represents a normal file.
The following 9 bits are divided into 3 groups, each 3 groups as 1 groups, from left to right, respectively, the file owner, file group, and all other user permissions.
R means the file is readable, w means the file is writable, and X indicates that the file can be executed.
Change file permissions with the command chmod. There are two kinds of
chmod (Ugoa) (=-+) (rwx) file
U represents the owner of the document, G represents the group of documents, and O represents the user of the system except the owner and the members of the group, and a represents the sum of all users (U,g,o)
+ means to increase the corresponding permissions,-the delegate reduces the appropriate permissions, = represents only the appropriate permissions
chmod g-w file will be able to complete the permissions of the above files to correct.
The second Kind
Corrected with numbers, R is 4,w to 2,x for 1
Add numbers to the corresponding permissions, such as RWX is 7,RW is 6
The permission method to correct the above problem is
chmod 775 file on the line.
Linux Command Learning