Making it executable

Every file carries permissions: who may **r**ead, **w**rite and e**x**ecute it. A script is only text until it has the execute permission:

  • chmod +x FILE adds execute, and chmod -x FILE removes it.
  • ls -F marks executables with *, and ls -l (on a real system) shows the full rwxr-xr-x string.
ls -F inbox
chmod +x inbox/spell.sh
ls -F inbox

Real world: "Permission denied" when you run ./deploy.sh almost always means a missing chmod +x. The numeric form, chmod 755 FILE, sets all three permission groups at once.