sudo no tty present and no askpass program specified
Hi,
I am running an Ubuntu Server 10.10. I have installed Apache2, I put my perl script in /var/lib/cgi-bin. When I run this perl script from the terminal it works fine. When go to a web browser it doesn't. When I look at Apache's error log, I see this line : "sudo no tty present and no askpass program specified" I tried editing the sudoers file, with the user www-data ALL=(ALL) NOPASSWD:/path_to_my_script. But nothing changed. What am I doing wrong? Thanks, vader |
Hello,
Do you have by any chance this in your sudoers file: Code:
Defaults requiretty Eric |
Hi Eric,
I don't have that line in my sudoers file. |
Hi,
Maybe this will shed some light: Quote:
Kind regards, Eric |
Hi Eric,
Would this be the proper way? Make a group called wheel, add the user www-data to that group. Edit the sudoers file and add this line: %wheel ALL=(ALL) NOPASSWD:/path_to_my_script I see that ubuntu doesn't have the wheel group anymore. Thanks |
Hello,
The syntax is correct so it will allow your user to execute that script without password but I don't think it will make any difference since you added that line for the user www-data before without success. You're trying to execute the command from a webbrowser right? I think that there lies your problem. www-data is a special user. Have you tried to use su to that user and run a sudo command from the terminal to see where it fails? I also found this on the internet for you. Since I don't know Perl I had to look around a bit but I believe it's related to your problem. And since you use Ubuntu another interesting thread related to your issue is this one on the Ubuntu forums. Hope it helps. Kind regards, Eric |
All times are GMT -5. The time now is 02:38 PM. |