Home >Operation and Maintenance >Linux Operation and Maintenance >What to do if the execution permission of the linux folder is insufficient
In Linux, if the execution permission of the folder is insufficient, you can use the chmod command to modify the permissions. This command is a command for the file permissions of the null user. The file calling permissions can be divided into file owners, user groups and For other users, level 3, the syntax is "chmod [-cfvR] [--help] [--version] mode file...".
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
Modifying the permissions can solve this problem. Permissions can be modified using the chmod command.
Linux chmod (English full spelling: change mode) command is a command that controls user permissions on files
Linux/Unix file calling permissions are divided into three levels: File Owner (Owner) , user group (Group), other users (Other Users).
Syntax
chmod [-cfvR] [--help] [--version] mode file...
Parameter description
mode: Permission setting string, the format is as follows:
[ugoa...][[+-=][rwxX]...][,...]
where:
u means The owner of the file, g represents the person who belongs to the same group as the owner of the file, o represents other people, and a represents all three.
means adding permissions, - means canceling permissions, = means setting only permissions.
r means readable, w means writable, x means executable, and X means only when the file is a subdirectory or the file has been set to be executable.
Other parameter descriptions:
-c: If the file permissions have indeed been changed, the change action will be displayed
-f: If the file permissions cannot be changed, do not Display error message
-v: Display detailed information about permission changes
-R: Make the same permission changes to all files and subdirectories in the current directory (that is, change them one by one recursively) )
--help: Display auxiliary instructions
--version: Display version
The example is as follows:
Change the file file1 .txt is set to be readable by everyone:
chmod ugo+r file1.txt
Set file file1.txt to be readable by everyone:
chmod a+r file1.txt
Set files file1.txt and file2.txt to The file owner can write to the same group as the file owner, but others cannot write to it:
chmod ug+w,o-w file1.txt file2.txt
Add executable permissions to the owner of the ex1.py file:
chmod u+x ex1.py
Recommended learning: Linux video tutorial
The above is the detailed content of What to do if the execution permission of the linux folder is insufficient. For more information, please follow other related articles on the PHP Chinese website!