[Apache] Following symbolic link

[Apache] Following symbolic link

am 24.09.2007 18:17:01 von Joah Senegal

Hello all,

I use the following script to run a command on my linux machine:

$output = shell_exec('ls -lart');
echo "

$output
";
?>

The script works fine if I use commands like cat ls dir. I get a output
back.

But now I made a symbolic link called groupmanager wich points to
/usr/lib/news/bin/ctlinnd. ctlinnd is a program to add a new group to a NNTP
server. normally this program should output "ok" or an error. but I get no
output. So the command isn;t executed. Its proberbly a security issue.

I added this to /etc/httpd/conf/httpd.conf


Options All
AllowOverride All


My appache server is running under the user "apache".

I tried to do in the bash "sudo apache" to try the command manually under
this user... but it says the user isn;t available at the moment (even if I
shutdown apache)

if I type the command manual in the bash under user root everything works
fine.

I already performed chmod 777 on the files I need. but it stil doens;t works

anyone know what the problem here?

Re: [Apache] Following symbolic link

am 24.09.2007 19:22:08 von unknown

Post removed (X-No-Archive: yes)

Re: [Apache] Following symbolic link

am 24.09.2007 21:48:54 von Joah Senegal

No it is possible with the above script. Read mij topicstart.... I already
performed succesfully commands like ls, dir, who, chmod and more. Only this
program (ctlinnd) wont execute with this method.

"Davide Bianchi" wrote in message
news:slrnfffsi8.37j.davideyeahsure@fogg.onlyforfun.net...
> On 2007-09-24, Joah Senegal wrote:
>> But now I made a symbolic link called groupmanager wich points to
>> /usr/lib/news/bin/ctlinnd.
>
> You can't simply run any command out from a php script, the command is
> probably trying to open files, load libraries and the like and all this
> require different permissions. You either write a proper CGI script
> and use the correct permissions or use one of the many web interface to
> do the same things. Why re-inventing the wheel?
>
> Davide
>
> --
> It's nice to be loved, but there's a lot to be said for CRINGING RESPECT
> --Anonymous button bin