Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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: asper.sh: Permission denied

-rw-r--r-- asper.sh

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 stackoverflow.com May 12 '11 at 4:38

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

    
chmod +x asper.sh. Also, this is not really a Stack Overflow question. Maybe superuser? Server fault? – asveikau May 12 '11 at 4:27
    
chmod +x asper.sh 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 asper.sh
share|improve this answer

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

chmod +x asper.sh
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .