Table of Contents

Fix "Permission Denied" while Executing Bash (Shell) Script on Linux

Cyrus Kao
Last modified on .

If you encounter an error like bash: ./ Permission denied when executing a bash (shell) script, meaning the script file itself is not permitted to execute. And it makes no difference even if you run it with sudo. To fix this, we'll be using the chmod command on Linux to modify the permissions of the script file.


Use chmod to add execute permission to the file:

$ sudo chmod +x

Change to your script's path.

Or use your preferred file manager to change the permissions of the script file:

File properties
File properties of GNOME Files


Sign in to leave a comment.