How to Solve Error: Linux permission denied

1. Preparation

For example, to create a script file for, the script code is as follows:

# ! /bin/bash 

echo Hello, world!

The function of the code is to output the characters Hello, world!

2. run the script

Switch to the directory where is located in the terminal and run the program, a Permission denied prompt appears, as follows:

[devel@localhost v2]$ ls
[devel@localhost v2]$ chmod 111
[devel@localhost v2]$ ls
[devel@localhost v2]$. /
 /bin/bash: ./ Permission denied

3.modify file permissions

This is that we can modify the file permissions with the help of the chmod command, as follows:

[devel@localhost v2] chmod 777 
[devel@localhost v2] ./ 


[devel@localhost v2] ./ profile_list get

Run the script, profile_list is the corresponding url, get is the request method.


Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *