Re: Shell_exec() [ or what else? ] to kill root-started FTP daemon
| From: | Pete Morganic | Date: | Tue, 22 Jul 2003 13:03:20 +0000 |
| Subject: | Re: Shell_exec() [ or what else? ] to kill root-started FTP daemon | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156218@lists.php.net to get a copy of this message | ||
check out the linux "sudo" command
pete
R evėŹĘår{óv ņń wrote:
Hello. I am trying to restart my FTP daemon by killing it and then starting it using the shell_exec() function: shell_exec('kill '.$pid ); Shell_exec does nothing by this - when i do ps -ef later, i see the daemon with the same pid still running. But it did return the correct pid when i ran: $pid = shell_exec('cat /var/myftpd.pid'); I think it cannot kill the process because it has no rights. What should be done to give php scripts rights to rule? I run apache 1.3.27, php 4.3.2 on suse 8.1; Apache starts as root, switches to nobody... !!! The FTP daemon cannot be started by any other user but root so idea to start and kill the daemon by some special apache user does not work :( Any ideas? Why can't my dear friend PHP rule???