LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Suexec issue (https://www.linuxquestions.org/questions/linux-software-2/suexec-issue-919424/)

adam_1784 12-19-2011 02:16 AM

Suexec issue
 
I just install apache on my server.
I also installed suexec.
But when i run command suexec -v output of this command is:
suexec policy violation: see suexec log for more details
and output of suexec error log is:
[2011-12-19 08:42:59]: too few arguments.

What is the problem can anyt one help me?

I install apache with following command:
yum install httpd-devel.

bathory 12-19-2011 02:32 AM

Hi and welcome to LQ

You have to use the capital "V":
Code:

suexec -V
Regards

adam_1784 12-19-2011 02:44 AM

Can you tell me how to change the AP_DOC_ROOT

bathory 12-19-2011 02:53 AM

Quote:

Originally Posted by adam_1784 (Post 4553461)
Can you tell me how to change the AP_DOC_ROOT

You need to recompile apache using "--with-suexec-docroot=/my/path", because it's hardcoded into the suexec bianry.
You can use google to search how it's done for your distro

Regards

adam_1784 12-19-2011 03:05 AM

Thanks for your help.

But i don't want to compile apache.
So i cant give the path at the compile time.
Do you any alternative to change doc_root manually.

bathory 12-19-2011 03:40 AM

No you can't.
While you can change the apache docroot from httpd.conf, it's not possible to do the same with suexec as it's hardcoded into it.
But you can use the homedir as an alternative if you want

Regards

adam_1784 12-19-2011 03:44 AM

Thanks.

Do you know apache configuration to support perl script(with suexec user group).
I tried but always gives the error that cmd is not in doc root.

bathory 12-19-2011 05:01 AM

Quote:

Do you know apache configuration to support perl script(with suexec user group).
I tried but always gives the error that cmd is not in doc root.
You can use the ~/public_html/cgi-bin directory if you want.
Or you should create a new cgi-bin (or whatever you want to call it) directory under the apache docroot, configure apache to execute scripts from that directory, use 755 attributes (or else suexec will complain) and test.

Regards

adam_1784 12-19-2011 05:09 AM

Yes I am trying using ~/public_html/cgi-bin to install movable type script
But when I access the mt.cgi page it shows entire code of mt.cgi instead of it is acctuall output.
I have given the permission 0755 to that folder.
In that I run php file it work fine.

bathory 12-19-2011 06:06 AM

You need to tell apache to execute scripts from that directory
Code:

<Directory /home/*/public_html/cgi-bin>
AllowOverride Options
Options ExecCGI
AddHandler cgi-script .cgi .pl
</Directory>


adam_1784 12-19-2011 07:33 AM

Thanks a lot.
It works i just have to add php handler to ron php file.


All times are GMT -5. The time now is 04:28 AM.