Re: becoming root user within php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
Thanks for all the info guys! I successfully made php use root user to 
preform a few commands. I restricted root access to allow only a few 
commands which were needed.

I'm doing my best to keep this thing as secure as possible which still 
preforming the tasks that need to be done.

Tom


On 7/26/05, Jack Scott <jack@xxxxxxxxxxxxx> wrote:
> 
> Hello,
> Stop! never give up the root password inside a text file anywhere on
> your machine!
> 
> you should keep this script out of the web path and exicute it using
> either the sudo or visudo commands in the shell.
> 
> If you are on a UNIX/Linux machine:
> add this to the first line of your script
> #!/usr/bin/php
> (or whatever the path to your php executable is)
> 
> then something like this to execute it...
> sudo ./myscript.php
> 
> Make sence?
> 
> On Tue, 2005-07-26 at 17:28 -0400, Tom Cruickshank wrote:
> > Hello,
> > I'm in the process of executing system commands using php. The only 
> problem
> > is that I am not entirely sure how to execute these system commands 
> using
> > root user.
> > (I need root access to do a few things through php). Whenever I use the 
> exec
> > command it uses the www user. Would anyone know? Thanks for any 
> assistance!
> >
> > Tom
> 
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux