View Single Post

  #6 (permalink)  
Old 06-16-2008
inetquestion
 
Posts: n/a
Default Re: PHP web interface for shell script or command

On Jun 13, 4:36 pm, The Hajj <hajji.hims...@gmail.com> wrote:
> On Jun 12, 10:21 pm,inetquestion<inetquest...@hotmail.com> wrote:
>
> > I have considered the following conditions, but ran into problems with
> > each...

>
> > 1. The Web server runs as 'nobody' which cannot be modified. php
> > scripts executed will be executed as nobody...and script doesn't
> > work. For what I'm trying to do setuid probably isn't a good fit due
> > to security concerns.

>
> > 2. web interface could write form inputs to a file. A daemon would
> > read items off the file and execute the intended script running as the
> > proper user. (seems clunky to me, but would work...)

>
> > 3. Any other suggestions?

>
> > -Inet

>
> I wish I would have saved my code!! prior to my current job as a web
> developer I use to work Help Desk. I was using php from the command
> line to 'code myself out of a job' . I don't remember much from it but
> what I can recall you won't have much with system_exec("ssh -u root
> blah blah vlah") because you won't be able to interact with it after
> that.
>
> You need to play around with sockets, google for php telnet sockets or
> something to that nature . I may have the bookmarks somewhere. I think
> I may have printed out what code I did have and filed it under CS at
> my desk. I think they way I was going to do it was have a listing
> service that the front end connect to. The service keeps the
> connection alive/open new ones. I'll see what I have/remember when I
> get back to work Monday, I think you get the gist of the idea. I wish
> I had more for you as I was going down this route before.


Any examples you have would be great. In the meantime I will checkout
your suggestion.

Reply With Quote