Loading...
Loading...
-bash: ./script.sh: Permission deniedThis error means the file does not have the execute permission set. On Linux, files must be explicitly marked as executable before they can be run as programs.
Use chmod to add the execute bit to the file.
# Add execute permission for the owner
chmod +x script.sh
# Or set specific permissions (755 = owner rwx, group rx, others rx)
chmod 755 script.sh
# Then run it
./script.shYou can also run the script by passing it to bash directly.
bash script.shUse our visual chmod calculator to understand and set the right permissions.