Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have something like this:

$re = shell_exec("sudo /usr/local/share/phantomjs --version");

Unfortunately this gives me another problem:

 sudo: no tty present and no askpass program specified
 Sorry, try again.

User that cron runs under is bokac so Using visudo as root I added line in /etc/sudoers :

  bokac ALL = NOPASSWD: /usr/local/share/phantomjs

I have to mention that /usr/local/share/phantomjs is a sym link to executable under /usr/local/share/phantomjs-master/bin/phantomjs.

Basically, this is not working, I keep getting error message stated above. Is my sudoers line correct? What am I doing or not doing wrong? Any help appreciated.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

All this was solved by chmod 0777 on executable file that sym link was pointing at, and no need for changing sudoers any more. That made more confusion then help.

share|improve this answer

Your Answer

 
discard

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.