Home >Operation and Maintenance >Linux Operation and Maintenance >linux. What to do if the permissions are not enough

linux. What to do if the permissions are not enough

藏色散人
藏色散人Original
2019-11-07 10:14:0824712browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to use linux commandsNext article:How to use linux commands