Many of Ubuntu's operations are performed in the terminal, and the files managed by the sudo command are owned by Root and cannot be changed by the general user. On the graphical interface, we can operate through the Permissions tab in the properties. However, once the file's properties show that the current user does not have read and write rights, the permissions cannot be modified on the graphical interface.
sudo chmod 600xxx (only the owner has read and write permissions)
sudo chmod 644xxx (owner has read and write permissions, group user only Read permissions)
sudo chmod 700xxx (only the owner has read and write and Execute permissions)
sudo chmod 666xxx (everyone has access to read and write)
sudo chmod 777xxx (everyone has access to read and write and execute)
where xxx refers to the file name (can also be a folder name, but to add-ld after chmod).
Explain the fact that the whole command is in the form
sudo chmod-(on behalf of type) XXX (owner) xxx (group user) xxx (other users)
Each of the three-digit digits represents a user-type permission setting. The value is 0~7, which is the binary [000]~[111].
Each bit of this three-bit binary number represents read, write, and execute permissions respectively.
If 000 means none of the three permissions, and 100 means read-only. In this way, we have the following correspondence:
0 [000] no permissions
4 [100] read-only permission
6 [110] Read and Write permissions
7 [111] Read and write execution permissions
Finally, attach the command to query the file (or folder) permissions.
Ls-l file name (folder will change-L to-ld).
linux--file Operations