Home >Operation and Maintenance >Linux Operation and Maintenance >linux. What to do if the permissions are not enough
linux. Insufficient permissions?
linux .Permission means that the permissions of the current directory of linux are insufficient.
Recommended: "Linux Tutorial"
Solution:
sudo -s #进入root用户模式,仍在原来目录下(不要用su - root,否则进入root目录了) cd /var/lib #进入指定目录 ll # 查看该目录下所有文件权限 chmod 777 files-name #更改指定文件的权限
r means the file can be read (read)
w means the file can be written (write)
x means the file can be executed (if it is a program)
Among them: rwx can also be replaced by numbers
r ————4
w ————–2
x ————1
- ————0
-rw——- (600) Only the owner has read and write permissions
-rw-r–r– (644) Only all Only the owner has read and write permissions, the group and others only have read permissions
-rwx—— (700) Only the owner has read, write, and execute permissions
- rwxr-xr-x (755) Only the owner has read, write, and execute permissions. The group and others only have read and execute permissions
-rwx–x–x (711) Only the owner Only have read, write, and execute permissions. Groups and others only have execution permissions
-rw-rw-rw- (666) Everyone has read and write permissions
- rwxrwxrwx (777) Everyone has read, write and execute permissions
How "755" is formed: "0" means no permission, "1" means executable permission, "2" means write permission, "4" indicates read permission. "7=1 2 4, 5=1 4"
The above is the detailed content of linux. What to do if the permissions are not enough. For more information, please follow other related articles on the PHP Chinese website!