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

link|improve this question

78% accept rate
2  
What exactly makes you think that www-data does not have the permission already? – grawity Oct 20 '11 at 11:45
feedback

1 Answer

up vote 1 down vote accepted

First of all, run

ls -l /usr/local/bin/filename

if there is no 'x' (execute) permission for "other" users, run

chmod 755 /usr/local/bin/filename

to give read/write/execute permissions to owner, read/execute permission to group and read/execute permission to other users.

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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