Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've move the public_html of a Joomla site from olduser to newuser. I've also moved the domain joomlasite.com from olduser to newuser; but when I go to joomlasite.com to visit it with the ownership of the newuser, 500 Internal Server Error is seen.

Note: There shouldn't be any problem with the permissions because with both 777 and (644/755) permissions, I get the same result.

I've even added die('Hello'); at the top of index.php but still the error is existing.

According to Niall Donegan's comment, I checked the file. The contents that were useful is:

SoftException in Application.cpp:350: UID of script "/home/newuser/domains/joomlasite.com/public_html/index.php" is smaller than min_uid
Premature end of script headers: index.php
SoftException in Application.cpp:350: UID of script "/home/newuser/domains/joomlasite.com/public_html/index.php" is smaller than min_uid
Premature end of script headers: index.php
SoftException in Application.cpp:350: UID of script "/home/newuser/domains/joomlasite.com/public_html/index.php" is smaller than min_uid
Premature end of script headers: index.php
SoftException in Application.cpp:350: UID of script "/home/newuser/domains/joomlasite.com/public_html/index.php" is smaller than min_uid
Premature end of script headers: index.php
SoftException in Application.cpp:350: UID of script "/home/newuser/domains/joomlasite.com/public_html/index.php" is smaller than min_uid
Premature end of script headers: index.php
SoftException in Application.cpp:350: UID of script "/home/newuser/domains/joomlasite.com/public_html/index.php" is smaller than min_uid
Premature end of script headers: index.php
SoftException in Application.cpp:350: UID of script "/home/newuser/domains/joomlasite.com/public_html/index.php" is smaller than min_uid
Premature end of script headers: index.php
SoftException in Application.cpp:350: UID of script "/home/newuser/domains/joomlasite.com/public_html/administrator/index.php" is smaller than min_uid
Premature end of script headers: index.php
SoftException in Application.cpp:350: UID of script "/home/newuser/domains/joomlasite.com/public_html/administrator/index.php" is smaller than min_uid
Premature end of script headers: index.php
SoftException in Application.cpp:350: UID of script "/home/newuser/domains/joomlasite.com/public_html/administrator/index.php" is smaller than min_uid
Premature end of script headers: index.php
SoftException in Application.cpp:350: UID of script "/home/newuser/domains/joomlasite.com/public_html/administrator/index.php" is smaller than min_uid
Premature end of script headers: index.php
SoftException in Application.cpp:350: UID of script "/home/newuser/domains/joomlasite.com/public_html/index.php" is smaller than min_uid
Premature end of script headers: index.php
SoftException in Application.cpp:350: UID of script "/home/newuser/domains/joomlasite.com/public_html/index.php" is smaller than min_uid
Premature end of script headers: index.php
SoftException in Application.cpp:350: UID of script "/home/newuser/domains/joomlasite.com/public_html/index.php" is smaller than min_uid
Premature end of script headers: index.php
SoftException in Application.cpp:350: UID of script "/home/newuser/domains/joomlasite.com/public_html/index.php" is smaller than min_uid
Premature end of script headers: index.php
SoftException in Application.cpp:350: UID of script "/home/newuser/domains/joomlasite.com/public_html/index.php" is smaller than min_uid
Premature end of script headers: index.php
SoftException in Application.cpp:249: File "/home/newuser/domains/joomlasite.com/public_html/index.php" is writeable by group
Premature end of script headers: index.php
SoftException in Application.cpp:249: File "/home/newuser/domains/joomlasite.com/public_html/index.php" is writeable by group
Premature end of script headers: index.php
SoftException in Application.cpp:249: File "/home/newuser/domains/joomlasite.com/public_html/index.php" is writeable by group
Premature end of script headers: index.php
SoftException in Application.cpp:249: File "/home/newuser/domains/joomlasite.com/public_html/index.php" is writeable by group
Premature end of script headers: index.php
SoftException in Application.cpp:249: File "/home/newuser/domains/joomlasite.com/public_html/index.php" is writeable by group
Premature end of script headers: index.php
SoftException in Application.cpp:249: File "/home/newuser/domains/joomlasite.com/public_html/index.php" is writeable by group
Premature end of script headers: index.php
SoftException in Application.cpp:249: File "/home/newuser/domains/joomlasite.com/public_html/index.php" is writeable by group
Premature end of script headers: index.php
SoftException in Application.cpp:249: File "/home/newuser/domains/joomlasite.com/public_html/index.php" is writeable by group
Premature end of script headers: index.php
SoftException in Application.cpp:249: File "/home/newuser/domains/joomlasite.com/public_html/index.php" is writeable by group
Premature end of script headers: index.php
SoftException in Application.cpp:249: File "/home/newuser/domains/joomlasite.com/public_html/index.php" is writeable by group
Premature end of script headers: index.php
SoftException in Application.cpp:249: File "/home/newuser/domains/joomlasite.com/public_html/index.php" is writeable by group
Premature end of script headers: index.php
SoftException in Application.cpp:249: File "/home/newuser/domains/joomlasite.com/public_html/index.php" is writeable by group
Premature end of script headers: index.php

Hope it be clear to understand.

Any suggestions for resolving the problem?

share|improve this question
    
Have you looked at the contents of /var/log/httpd/domains/joomlasite.com.error.log ? –  Niall Donegan Feb 24 '12 at 17:37
    
Thank you very much @NiallDonegan. I updated my question according to checking that file. –  smhnaji Feb 24 '12 at 19:18
add comment

1 Answer

up vote 1 down vote accepted

My bet is that the files in that the files in /home/newuser/domains/joomlasite.com/public_html/ are owned by root. It looks like you're using suPHP which will run the PHP files as the same user as owns the files. The min_uid restriction is there to make sure that suPHP isn't run as root or another system user inadvertently.

The fastest fix will probably be to run the following:

chown -R newuser /home/newuser/domains/joomlasite.com/public_html/

The second part of the error is because of the 777 permissions. The fix for this would probably be:

find /home/newuser/domains/joomlasite.com/public_html/ -type f -exec chmod 644 {} \+

This will find all files in the public_html directory and change the permissions to 644 which is a lot safer than 777 on a shared system!! If the above command throws an error, replace the + with \;

share|improve this answer
1  
You might also need to change the permissions on directories to 755. –  Niall Donegan Feb 24 '12 at 23:59
    
Perfect. I love the super linux commanders like you! You're right. I'm using SuPHP and it solved my problem :) Would you please add directadmin tag? It'll help our friends to resolve such a problem(s) later. –  smhnaji Feb 25 '12 at 9:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.