Forum Moderators: phranque

Message Too Old, No Replies

Allowing exec cmd execution

         

kaidok

2:42 pm on May 29, 2009 (gmt 0)

10+ Year Member



I get nothing if I try to execute this SSI directive, I mean, if I put the following on my shtml file:

<!--#exec cmd="ls"-->

Nothing displays, neither with /bin/ls, I have also tried with another shell commands but I don't get any result. So I guess it is aproblem from the directive.

I have the directory where I have my file that contains the ssi directive, set like the following on my httpd.conf file:

<Directory /usr/local/apache/htdocs/www/sitio1>
Options +Includes +ExecCGI
AddHandler server-parsed .shtml
</Directory>

So, I guess, exec directive should work. Does anyone know what can be happening?

jdMorgan

2:51 pm on May 29, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you running suexec, or any other 'wrappers'?

Is there anything useful in your OS or server error log files?

Jim

kaidok

5:16 pm on May 29, 2009 (gmt 0)

10+ Year Member



Thanks for your tip of suexec it was a suexec problem, by disallowing it I can execute the command normally, anyway what should I do to be able to use both of them?

The following problem appears on the suexec_log, it seems to be a permission issue:

[2009-05-29 21:09:28]: uid: (502/www) gid: (500/500) cmd: ls
[2009-05-29 21:09:28]: cannot stat program: (ls)

I have changed both the application ls ls and the file that contains the SSI directive to the user and group that I have defined in SuexecUserGroup directive in httpd.conf, but it keeps with the same message...

Thanks a lot for your help.