The LS command plus the-l parameter can see the file permissions
Just like this:
Drwxrwxr-x 2 ASML users 4096 Jul 02:45 desktop
The first d indicates that this is a directory, if "-" is the file, "L" for the link, then the three sets of rwx (read and write run) settings, respectively: The file Attribution User (U) file Attribution Group (g) other users (O), display the letter is open, display horizontal line to reject
2 Don't know what it is yet.
ASML is the attribution user, indicating that the folder is ASML user, and users are the attribution group
4096 is the size, the back does not explain
------------------------------------------------------------
You can use chmod to set file permissions, Chown set file attribution
CHMOD provides both symbolic and numeric operations:
This is a letter operation: Indicates that the other user (O) Setting up desktop has permission to run (x) This is a folder,-R means including its sub-files and subdirectories
Chmod-r O-x desktop/
Digital operations (r=4 w=2 x=1 What permissions you want to add numbers together) this will set the user, group, Other (UGO):
Chmod-r 777 desktop/
--------------
Chown settings:
Single Set User:
Chown-r ASML desktop/
To set up users and groups:
Chown-r asml.users desktop/
-------------------------------------------------------------
Careless overall chmod-r XXX/ Solution:
This is a cup, because I just (July 24, 2017) accidentally killed a bit .... Suddenly feel the sky collapsed, thought hopeless, results actually search to rescue method:
Find a Linux system (as clean as possible), export the permissions of the system, and then import it to this machine.
Execute on a good machine (recommended to root directory)
Getfacl-r/> Linux.chmod.txt
And then upload it to the machine to be repaired through various channels.
Execute (recommended to root directory):
Setfacl--restore=chmods.txt
About file permissions under Linux