Running a system command from php
Posted: Fri Jun 26, 2009 1:38 am
Hi,
I am new to php and web development. I wanted to run a system command from php script. I am using shell_exec() to run the command, but i need root privileges to execute it. I dont want to make 'Apache' a 'sudo user' nor do I want to change the default 'apache user' to root.
Please can someone suggest me a way in which I will be able to execute the command with root privileges.
Thanks in Advance,
Amul
I am new to php and web development. I wanted to run a system command from php script. I am using shell_exec() to run the command, but i need root privileges to execute it. I dont want to make 'Apache' a 'sudo user' nor do I want to change the default 'apache user' to root.
Please can someone suggest me a way in which I will be able to execute the command with root privileges.
Thanks in Advance,
Amul