0
votes
1answer
122 views

setresuid operation not permitted when calling via php

I've got following Problem: my Apache and PHP script are running as user www-data. I want to call a script that can only be executed as root, so I added a new File to /etc/sudoers.d to allow this ...
1
vote
3answers
15k views

how to remove symbolic link

i was doing sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin but i accidentally typed something else. So now I want to correct it but it says symbolic link already exist. Please help, Thanks in ...
1
vote
0answers
150 views

stty doesn't reset with sudo after Ctrl + C

Let's say I have following simple PHP script: misan@thrope:~/tests$ cat stty.php <?php shell_exec('stty -icanon -echo'); // exit; $fh = fopen('php://stdin', 'r'); while (!feof($fh)) { $c = ...
0
votes
1answer
330 views

SVN privilege for newly created user

I am required to create a new user and then svn co into the newly created user's home directory by calling a bash script from a php page. The below example is a line from the sudoers file which I saw ...
0
votes
1answer
406 views

How can I run PHP scripts without prefixing my scripts with sudo?

I'd like to be able to run PHP scripts without needing to use sudo in every command. My user is not root obviously. How can I accomplish this feat? I'm new to Linux, and I have a little knowledge ...
0
votes
1answer
247 views

Executing adb from php

I am trying to run adb from PHP using: exec( 'adb devices', $output, $return_val ); but I get 126 error. I think the problem is that php is running as 'www-data' user and does not have permissions ...
2
votes
2answers
9k views

Call a shell script from PHP, run as root

I'm running ubuntu 11.10. I want to be able to call a shell script from php and run that script as root. When my php attempts to call the shell script as root --like this: $output = shell_exec('sudo ...
4
votes
1answer
2k views

How to setup sudoers for Apache web service?

# User privilege specification root ALL=(ALL:ALL) NOPASSWD: ALL apache ALL=(ALL:ALL) NOPASSWD: ALL me ALL=(ALL:ALL) NOPASSWD: ALL In Fedora both works: http://localhost/test echo ...
1
vote
1answer
9k views

How do I enable a user to sudo without password?

I have a php script with this: <?php #echo exec('whoami'); $output = shell_exec('bash /usr/local/svn/bash_repo/make-live'); echo "$output"; ?> The make-live script contains this: ...