Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 07-07-2010, 07:11 PM   #1
LQ Newbie
Registered: Aug 2003
Posts: 7

Rep: Reputation: 0
Question Apache2, suexec error: command not in docroot (/usr/bin/php-cgi)

Hi, I'm having a bit of trouble getting suexec to run properly.

Basically when I try execute a PHP script with SuexecUserGroup set, I get the following error:

uid: (501/uname) gid: (501/501) cmd: php-cgi
command not in docroot (/usr/bin/php-cgi)

Without SuexecUserGroup set, they work fine, but obviously aren't executed as the script's owner.

Here's one of the domain's configs:
<VirtualHost *:80>
    ServerName www.domain
    ServerAlias domain

    SuexecUserGroup uname gname

    ServerAdmin webmaster@domain
    DocumentRoot /var/www/domain/public_html

    <Directory /var/www/domain/public_html/>
        Order allow,deny
        allow from all

    ErrorLog logs/domain-error_log
    CustomLog logs/domain-access_log common
And the suexec config info

suexec -V
 -D AP_DOC_ROOT="/var/www"
 -D AP_GID_MIN=100
 -D AP_HTTPD_USER="apache"
 -D AP_LOG_EXEC="/var/log/httpd/suexec.log"
 -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
 -D AP_UID_MIN=500
 -D AP_USERDIR_SUFFIX="public_html"
Any suggestions on what I might be doing wrong? I can provide other info if needed.

For a bit of background info, the end result i'm trying to achieve is for files that get uploaded via a php script to be owned by the user account that owns the script rather than by the apache user. From what I can tell, suexec is the way to accomplish this.
Old 07-17-2010, 02:57 PM   #2
Registered: Oct 2009
Posts: 39

Rep: Reputation: 15
Try SuexecUserGroup apache apache

Last edited by millergroup; 07-17-2010 at 02:59 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? i_heart_pandas Linux - Software 7 09-18-2009 08:33 AM
Error compiling PHP: /usr/bin/ld: cannot find -lltdl nyheat Linux - Server 4 09-16-2009 02:40 PM
Apache2 cgi-bin Forbidden Access cluckshot Linux - Software 5 01-09-2009 12:26 PM
why can't create a folder in /usr/lib/cgi-bin adam_ant Linux - Software 2 12-07-2005 05:05 AM
linux command error message bash: /usr/bin/find: No such file or directory sundaram123 Linux - General 8 04-02-2002 07:18 AM

All times are GMT -5. The time now is 08:49 AM.

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