Hello all,
I have a script which is going to add a new user to the system. I am using PHP to execute that script, I have a suid on that script (shell script). But I get permission denied in the logs, the page opens well in the browser. I tried the following, changing the owner of the script to apache and root while giving it 711 permission and 4711 permission. But all does not work. It seems that apache just reads the file and execute the commands in it. How can I execute a script in any folder (on the system) as root.
Bye.
On 24/11/02 11:09 +0530, Amish Munshi wrote:
am using PHP to execute that script, I have a suid on that script (shell script). But I get permission denied in the logs, the page opens well in
<snip> suid bits don't work on shell scripts. `usermod -p $crypted_password` in a SUID PHP script
Devdas Bhagat
On Sun, 24 Nov 2002, Devdas Bhagat wrote:
On 24/11/02 11:09 +0530, Amish Munshi wrote:
am using PHP to execute that script, I have a suid on that script (shell script). But I get permission denied in the logs, the page opens well in
<snip> suid bits don't work on shell scripts. `usermod -p $crypted_password` in a SUID PHP script
I want to add a user, not modify it. I want to add a new virtual host to apache, so wrote a shell script to create a new <VirtualHost ...>.......</VirtualHost> section and then append it to httpd.conf and do a HUP to the apache servers. I am still right there where I started off. How do I execute a shell script (or even a command) as root using PHP. Thanks for the help.
Devdas Bhagat
On Sun, 24 Nov 2002, Devdas Bhagat wrote:
On 24/11/02 11:09 +0530, Amish Munshi wrote:
am using PHP to execute that script, I have a suid on that script (shell script). But I get permission denied in the logs, the page opens well in
<snip> suid bits don't work on shell scripts. `usermod -p $crypted_password` in a SUID PHP script
Do you mean that if I write a simple c program with system() function and make it suid then it will work.
Devdas Bhagat