Victor
Victor

Reputation: 675

'mkdir' in a shell file cannot create directory: "Permission denied"

I have a shell script in my home folder:

copy.sh

mkdir new_folder

when I ran the shell script from my home folder:

./copy.sh

I got error message:

-bash: ./copy.sh: Permission denied

Why?

Upvotes: 2

Views: 7164

Answers (1)

Jahid
Jahid

Reputation: 22428

You have to give the script execution permission:

chmod +x path_to_the_copy.sh

Upvotes: 2

Related Questions