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

How can I give permission for the www-data user of Ubuntu machine to execute a command installed in /usr/local/bin ?

share|improve this question
What exactly makes you think that www-data does not have the permission already? – grawity Oct 20 '11 at 11:45
up vote 1 down vote accepted

First of all, run the following command:

ls -l /usr/local/bin/_filename_

If there is no "x" (execute) permission for other users, run this command to give read/write/execute permissions to owner, read/execute permission to group and read/execute permission to other users.

chmod 755 /usr/local/bin/_filename_

See also chmod(1) manual page.

Also file may not run for other reasons besides permissions - inaccessible shared libraries, wrong PATH in environment + running via short name, inaccessible interpreter (if it's a script) etc.

share|improve this answer

You must log in to answer this question.

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