SoftException in Application.cpp:404. Mismatch between target UID and UID of file.

BlueCola

Verified User
Joined
Jan 12, 2012
Messages
75
Today one of my customers called me that his website was down, without him changing anything. I opened up the website, and got an 500 internal error. I took a log at the logs and this is what showed up:

Code:
[Fri Nov 30 16:54:32 2012] [error] [client 77.169.180.xx] SoftException in Application.cpp:404: Mismatch between target UID (99) and UID (518) of file "/home/michiel/domains/myclientdomain.com/public_html/index.php
[Fri Nov 30 16:54:32 2012] [error] [client 77.169.180.xx] Premature end of script headers: index.php

This happens to all his folders and files, and I really have no ****ing clue where to look for the problem. I did some research at Google, but it seems that this problem shows up very rarely and there is not a clear fix for it.

Ofcourse I could 'reset' the account, but I want to know the cause and fix for this problem.

Any help would be greatly appreciated. My server is running the last version of DirectAdmin, PHP 5.3 compiled with suPHP on CentOS 6.0.
 
How is php installed on your server? what user has the user ID of 99? What user has the user ID of 518?

Jeff
 
PHP is installed with CustomBuild. Thanks for that, I looked into the passwd file and found out that the user where it's all about (michiel) had an user id '0' which is equals to the root account. The user where it's about is one of my employees who has root access to the server, and he thought it would be handy to change his user ID from '518' to '0' so he didn't need 'sudo' anymore. Very stupid ofcourse, because suPHP requires the files to run under the useraccount (which is 518).

So when his UID isn't 518 anymore, you'll get strange errors.

I changed back the UID and GID to 518 and 520 (that's what they were) and rebooted my server. I also maked sure that the permissions of the files are on 518/520, but I still get the same error:

Code:
[Fri Nov 30 16:54:32 2012] [error] [client 77.169.180.xx] SoftException in Application.cpp:404: Mismatch between target UID (99) and UID (518) of file "/home/michiel/domains/myclientdomain.com/public_html/index.php
[Fri Nov 30 16:54:32 2012] [error] [client 77.169.180.xx] Premature end of script headers: index.php

UID 99 points to the user 'nobody' (?). I really have no idea what the "Target UID" is, and where this error comes from, since the UID is set to 518 now.
 
Last edited:
Because he probably recursively chown the files. You will need to run a chown -R on the folder to the right user.

Code:
chown -R michiel:michiel /home/michiel/domains
 
Because he probably recursively chown the files. You will need to run a chown -R on the folder to the right user.

Code:
chown -R michiel:michiel /home/michiel/domains

Done that, didn't work. All his files already were UID 518/GID 520 (the right ones). Although, it seems that suPHP requires the UID and GID to be 99 (nobody), which is kinda weird.
 
Something might be wrong in the template then. I would look at the virtual host file for the user in /usr/local/directadmin/data/users/username/httpd.conf and see what it has for suPHP_UserGroup. You might also want to look through the /usr/local/suphp/etc/suphp.conf file.
 
Last edited:
Also look at chmods, suphp and other fcgi errors like these can just mean something completely different.

I believe files should be 644, folders 755. If not sure check another user which is working fine.

Check public_html itself and all files/dirs in it, just compare to another user.
 
Back
Top