How to connect as linux root user in php [duplicate]
Possible Duplicate:
How to run PHP exec() as root?
Hey Guys,
I need to connect the linux root user in php.
i hosted my file in var/www/html/connect.php
I need to execute one shell_exec script. It says it "Only root user can login".
How can i change that? or Please help me to sort the problem.
Usually php/apache executes the php files using the www-data user. if you need to execute your shell, all you need to do is to give the corresponding permissions to www-data for that file using chmod
you need to give apache (or whatever is running php) sudo
rights to the server, than you can run as root, bu doing:
sudo command
精彩评论