[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--

posted @ 2021-02-08 21:23  Zhentiw  阅读(108)  评论(0编辑  收藏  举报