Have located ( I think ) the problem.
I have been calling 'super' from the php script and when I call 'cadduser'
it works perfect but when I call 'caddvsite' I get an 'Unable to setgid=0'
error. Any idea why this would happen? Both executables are owned by
root.root and permission of both are set to 4700. the exec() call uses the
'sh' shell on both script calls.
The only differance is that one works and the other doesn't. Any ideas?
Thanks,
Chuck
----- Original Message -----
From: "Charles Williams (CEO)"
<[EMAIL PROTECTED]>
To: "Php-General (E-mail)" <[EMAIL PROTECTED]>
Sent: Friday, May 18, 2001 2:38 PM
Subject: [PHP] Problem with exec, shell_exec
> below you'll see a bit of code that is not working for me. I have tried
> exec, shell_exec, passthru, system. nothing works. If I copy the echoed
> copy of the command and paste it in an SSH session it works 100%. all of
> the exec, and such use the 'sh' shell. So I changed to that shell to
verfy
> that it is working and it still works great in SSH but only halfway in the
> script. The command will create the needed directories but then it quits.
> It doesn't finish the job.
>
> $pass_string = "caddvsite -i ".$IP." -n www -d ".$domain;
> if($email=="y")$pass_string .= " -e";
> if($web=="y")$pass_string .= " -w";
> $pass_string .= " -q ".$Quota." -u ".$Users;
> if($cgi=="y")$pass_string .= " -c";
> if($ssi=="y")$pass_string .= " -s";
> if($frontp=="y")$pass_string .= " -x";
> if($ssl=="y")$pass_string .= " -l";
> if($apop=="y")$pass_string .= " -o";
> if($ftp=="y")$pass_string .= " -f";
> if($telnet=="y")$pass_string .= " -t";
> # $pass_string .= " &";
> echo"$pass_string";
> # system("touch /forbidden 2>&1");
> # printf("%s",system($pass_string));
> exec( EscapeShellArg($pass_string) );
>
> Any ideas appreciated.
>
> chuck
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]