From: Johan S. <Joh...@xs...> - 2007-02-19 21:06:32
|
Piet van den Bos wrote: > Hi all. > > How can I start stop LCD4LINUX from a PHP script running > on an Apache webserver. > When i use exec() the command is refused because the user is > apache and lcd4linux only allows to run from root user. > > Any one that can help ? The insecure solution: make lcd4linux a set-uid-root program ( chmod u+s `which lcd4linux` should do the trick) The secure solution: write a very small and obviously correct program that starts and stops lcd4linux depending on the existance of a file (or better input from a socket). Now let your PHP script manipulate that file (or output to the socket). Regards, Johan > > Piet > > |