Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to solve the problem of insufficient permissions of the current directory in linux

Shulou Source: shulou.com Published: 2022-06-02 21:55:23 10月16日 Update

How to solve the problem of insufficient permissions in the current directory of linux? I believe that many inexperienced people are at a loss about this, so this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Solution:

Sudo-s # enters root user mode and remains in the original directory (do not use su-root, otherwise you will enter the root directory) cd / var/lib # enter the specified directory ll # to view all the file permissions in this directory chmod 777 files-name # change the permissions of the specified files

R indicates that the file can be read (read)

W indicates that the file can be written (write)

X indicates that 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 permission

-rw-r-r- (644) only the owner has read and write access, and groups and others only have read permission

-rwx-- (700) only the owner has the permission to read, write and execute

-rwxr-xr-x (755) only the owner has read, write, and execute permissions, and groups and others only have read and execute permissions

-rwx-x-x (711) only the owner has the permission to read, write, and execute, and groups and others only have the permission to execute

-rw-rw-rw- (666) everyone has read and write access

-rwxrwxrwx (777) everyone has access to read, write and execute

How does "755" form: "0" indicates no permission, "1" indicates executable permission, "2" indicates writeable permission, and "4" indicates readable permission. "7 million 1 2 4 5 # 1 4"

After reading the above, do you have the solution to the problem of insufficient permissions in the current linux directory? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Permissions only directories owners files problems not enough contents methods more helpless for this methods reasons skills numbers patterns users programs Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux vpn MariaDB Redmi Shulou Tech Info