LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-19-2011, 02:16 AM   #1
adam_1784
Member
 
Registered: Dec 2011
Posts: 41

Rep: Reputation: Disabled
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.
 
Old 12-19-2011, 02:32 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,165
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi and welcome to LQ

You have to use the capital "V":
Code:
suexec -V
Regards
 
Old 12-19-2011, 02:44 AM   #3
adam_1784
Member
 
Registered: Dec 2011
Posts: 41

Original Poster
Rep: Reputation: Disabled
Can you tell me how to change the AP_DOC_ROOT
 
Old 12-19-2011, 02:53 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,165
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by adam_1784 View Post
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
 
Old 12-19-2011, 03:05 AM   #5
adam_1784
Member
 
Registered: Dec 2011
Posts: 41

Original Poster
Rep: Reputation: Disabled
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.
 
Old 12-19-2011, 03:40 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,165
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
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
 
Old 12-19-2011, 03:44 AM   #7
adam_1784
Member
 
Registered: Dec 2011
Posts: 41

Original Poster
Rep: Reputation: Disabled
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.
 
Old 12-19-2011, 05:01 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,165
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
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
 
Old 12-19-2011, 05:09 AM   #9
adam_1784
Member
 
Registered: Dec 2011
Posts: 41

Original Poster
Rep: Reputation: Disabled
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.
 
Old 12-19-2011, 06:06 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,165
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
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>
 
Old 12-19-2011, 07:33 AM   #11
adam_1784
Member
 
Registered: Dec 2011
Posts: 41

Original Poster
Rep: Reputation: Disabled
Thanks a lot.
It works i just have to add php handler to ron php file.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
httpd-2.2.3 | error - suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) jmahto Linux - Enterprise 3 07-14-2010 01:53 AM
suexec and suphp liang3391 Linux - Server 1 08-16-2009 06:11 PM
Enabling suExec nitaish Linux - General 1 10-19-2004 07:46 AM
SuEXEC problem tanmaya Linux - Networking 0 04-03-2003 12:54 AM
Apache suexec Rachel Carter Linux - Software 0 01-31-2003 03:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration