Problems with suPHP

Rick L.

Verified User
Joined
Jun 24, 2006
Messages
23
Location
Netherlands
Hi,

I have problems with my new DirectAdmin server, and it's caused bij suPHP.

There are two accounts on the server: one with a domain name, the other one using the IP address (0.0.0.0/~username).

With the normal installation, the second account doesn't work (500 Internal Server Error), but the account with the domain name does. When I add "suPHP UserGroup username username" to the suPHP config file, the second account works, but the account with the domain name doesn't work anymore. And when I add the same line for the other account with the domain name, the other account doesn't work anymore.

With the normal configuration, I'll get the following error for the account using the IP address:

[Mon Sep 08 18:27:12 2008] [error] [client 62.194.*.*] No user or group set - set suPHP_UserGroup

When I set suPHP_UserGroup, the other account shows a 500 error, with the following errors in the logs:

[Mon Sep 08 18:18:20 2008] [error] [client 62.194.*.*] SoftException in Application.cpp:350: Mismatch between target UID (506) and UID (508) of file "/home/USER/domains/DOMAIN.EXT/public_html/gallery2/main.php"
[Mon Sep 08 18:18:20 2008] [error] [client 62.194.*.*] Premature end of script headers: main.php

So, it seems to be impossible to let then both work. Does anyone have an idea how to solve this? Because now one of my websites is down...

Thanks a lot in advance,
Rick
 
You need to make sure that the files are owned by the user of that domain.

chown -R USER:USER /home/USER/domains/DOMAIN.EXT/public_html
 
Thanks for your fast reply!

All the files are owned by the right user and group, that's not the problem. The strange thing is the error message "Mismatch between target UID (506) and UID (508) of file" is that UID 506 and 508 are the two different users.
 
Well there is a reason its loading the files with a different username then the one they are chown to.

Make sure that suPHP_UserGroup matches the actual user that the files are owned by.
 
The server does't recognize the command "suPHP_UserGroup". I tried the last thing that was described, but now I cannot start Apache anymore:

Starting httpd: Syntax error on line 33 of /usr/local/directadmin/data/users/user/httpd.conf:
Invalid command 'suPHP_UserGroup', perhaps mis-spelled or defined by a module not included in the server configuration

EDIT

I guess I was too fast, it seems to work right now. Thanks a lot!!
 
Do:
Code:
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d

Instead of:
Code:
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
 
The server needed some more time before I was able to restart Apache. The problem is now solved, thank you very much!
 
I'm currently upgrading a test server from apache 2.2.22 and php 5.2.17 to apache 2.4.2 and php 5.4.5.

When all is done (apache, php, suphp, mysql etc) and I restart apache I get:

Code:
custombuild # /usr/local/etc/rc.d/httpd restart                                            Stopping httpd:  [ FAILED ]
Starting httpd:  [ OK ]
AH00526: Syntax error on line 26 of /etc/httpd/conf/extra/httpd-directories.conf:
Invalid command 'suPHP_UserGroup', perhaps misspelled or defined by a module not included in the server configuration

I tried the above, to no avail. Give us a clue please? suphp is definately installed.
 
I'm currently upgrading a test server from apache 2.2.22 and php 5.2.17 to apache 2.4.2 and php 5.4.5.

When all is done (apache, php, suphp, mysql etc) and I restart apache I get:

Code:
custombuild # /usr/local/etc/rc.d/httpd restart                                            Stopping httpd:  [ FAILED ]
Starting httpd:  [ OK ]
AH00526: Syntax error on line 26 of /etc/httpd/conf/extra/httpd-directories.conf:
Invalid command 'suPHP_UserGroup', perhaps misspelled or defined by a module not included in the server configuration

I tried the above, to no avail. Give us a clue please? suphp is definately installed.

Try:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build suphp
./build rewrite_confs
 
I guess I should again delete all the custom apache confs first? How about /etc/httpd?
 
So I tried it and it works. Until I change suphp settings from paranoid to owner. Then I get complains about the section
Code:
<Directory "/var/www/html">
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
        <IfModule mod_suphp.c>
                suPHP_Engine On
                suPHP_UserGroup webapps webapps
                SetEnv PHP_INI_SCAN_DIR
        </IfModule>
</Directory>
in /etc/httpd/conf/extra/httpd-directories.conf, saying

Code:
AH00526: Syntax error on line 26 of /etc/httpd/conf/extra/httpd-directories.conf:
Invalid command 'suPHP_UserGroup', perhaps misspelled or defined by a module not included in the server configuration

We edit the configs as stated in http://help.directadmin.com/item.php?id=176
 
Last edited:
Because you dont use usergroup when using owner mode it finds the owner based on the directory settings. You would have to comment out the suphp usergroup setting in the template and rewrite the templates.
 
Ok. I did remove the offending bit from the configs earlier and it seems to hold. Now if only I could get around the whole

Code:
AH00037: Symbolic link not allowed or link target not accessible: /var/www/html/webmail1
problem.

I set
Code:
<Directory "/var/www/html">
  Options Indexes FollowSymLinks
  AllowOverride None
  Allow from all
  Order allow,deny
</Directory>
under DocumentRoot and it doesn't make any difference.
 
site gives a white page

Hello,

I have a problem with one of my websites in directadmin, when I go to the URL it gives white page. I'm using centos when I restart apache it gives an error for suphp and I rebuild suphp, the site still gives white pages, any ideas.
 
Does anyone have any thought on the whole "AH00037: Symbolic link not allowed or link target not accessible" problem?
 
Have you looked at the virtual host settings yet? It might be matching the default virtual host. Maybe /etc/httpd/conf/extra/httpd-vhosts.conf
 
Back
Top