Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My shell script runs from the command line, but fails in cronjob.

/bin/sh: Permission denied


I guess the permission should look like '-rwxr-xr--'

How can I change the permission to be like that?

share|improve this question

migrated from May 12 '11 at 4:38

This question came from our site for professional and enthusiast programmers.

chmod +x Also, this is not really a Stack Overflow question. Maybe superuser? Server fault? – asveikau May 12 '11 at 4:27
chmod +x will result in -rwxr-xr-x which will also work, but is not the permission setting asked for in the question. – Trott May 12 '11 at 4:30
up vote 2 down vote accepted

If you want permissions to look like -rwxr-xr--:

chmod 754
share|improve this answer

If you just want to add the execute bit, it's as easy as:

chmod +x
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.