[Bash] Chmod

Chmod

## Create a file
vim script.sh
## output some content
echo "Hello World"
## Run the script
./script.sh

It ouput permission denied: ./script.sh.

If we log out:

ls -l

it prints -rw-r--r--.

To fix it:

chmod u+x script.sh

Now it becomes -rwxr--r--

原文地址:https://www.cnblogs.com/Answer1215/p/14391109.html