1. Preparation
For example, to create a script file for test.sh, 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 test.sh is located in the terminal and run the program, a Permission denied prompt appears, as follows:
[devel@localhost v2]$ ls test.sh [devel@localhost v2]$ chmod 111 test.sh [devel@localhost v2]$ ls [devel@localhost v2]$. / test.sh /bin/bash: ./test.sh: 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 test.sh [devel@localhost v2] ./test.sh Hello,world!
add:
[devel@localhost v2] ./test_curl.sh profile_list get
Run the script, profile_list is the corresponding url, get is the request method.
end!
Similar Posts:
- [Solved] su: warning: cannot change directory to : Permission denied ;-bash: bash_profile: Permission denied
- SSH login error: “warning: unprotected private key file” problem
- [Solved] Git Bash error: could not lock config file Java/jdk1.7.0_71/.gitconfig: Permission denied
- macos -bash: yarn: command not found/-bash: cnpm: command not found
- After installing node on MAC, enter node – V to prompt node command not found
- SU: /BIN/BASH: PERMISSION DENIED [How to Solve]
- [JVM] Linux calls jmap and reports an error permission denied
- If permissions 0644 for ‘/ root /. SSH / ID appears_ It is OK to reduce the permission to 0600
- Jupyter notebook new Python3 Error: Permission denied: Untitled.ipynb,Modify workspace
- [Solved] PHP write file permission failure: file_put_contents: failed to open stream: Permission denied