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:
And the suexec config info
SuexecUserGroup uname gname
allow from all
CustomLog logs/domain-access_log common
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.
I have also tried using suPHP to achieve the same goal, which has worked after a fashion, but introduced another problem. phpMyAdmin (which is installed to /usr/share/phpmyadmin so it's accessible to all domains) won't work as it isn't in the domain's document root, nor owned by the domain's user account.
phpmyadmin apache config:
Basically what I'm trying to achieve is the files upload as the domain's user, and still have phpmyadmin and other shared scripts accessible to all domains/accounts. If this is possible with suexec or suphp, great. If there's a better way, I'm open to suggestions
# Deny from all
# Allow from 127.0.0.1
Allow from all
Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin