Home > Operation and Maintenance > Linux Operation and Maintenance > Linux cannot open directory, prompts insufficient permissions

Linux cannot open directory, prompts insufficient permissions

王林
Release: 2019-11-22 10:28:34
Original
13303 people have browsed it

Linux cannot open directory, prompts insufficient permissions

Solution:

sudo -s            #进入root用户模式,仍在原来目录下(不要用su - root,否则进入root目录了)
Copy after login
cd   /var/lib      #进入指定目录
Copy after login
ll                     # 查看该目录下所有文件权限
Copy after login
chmod 777 files-name   #更改指定文件的权限
Copy after login

Additional knowledge points:

r means the file can be read (read)

w means that the file can be written (write)

x means that the file can be executed (if it is a program)

where: rwx can also be replaced by a number

r ————4

w ————–2

x ————1

- ————0

-rw— —- (600) Only the owner has read and write permissions

-rw-r–r– (644) Only the owner has read and write permissions, the group and others only have read permissions 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 has read, write, and execute permissions, the group and others only have execute permissions 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, and "4" means read permission. "7=1 2 4, 5=1 4"

Recommended tutorial:linux tutorial

The above is the detailed content of Linux cannot open directory, prompts insufficient permissions. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template