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:
Code:
<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
</Directory>
ErrorLog logs/domain-error_log
CustomLog logs/domain-access_log common
</VirtualHost>
And the suexec config info
Code:
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.