1

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?

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
smhnaji
  • 619
  • 2
  • 11
  • 24
  • Have you looked at the contents of /var/log/httpd/domains/joomlasite.com.error.log ? – Niall Donegan Feb 24 '12 at 17:37
  • [Administration panels are off topic](http://serverfault.com/help/on-topic). [Even the presence of an administration panel on a system,](http://meta.serverfault.com/q/6538/118258) because they [take over the systems in strange and non-standard ways, making it difficult or even impossible for actual system administrators to manage the servers normally](http://meta.serverfault.com/a/3924/118258), and tend to indicate low-quality questions from *users* with insufficient knowledge for this site. – HopelessN00b Apr 09 '15 at 02:49

2 Answers2

1

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 \;

Niall Donegan
  • 3,869
  • 20
  • 17
  • 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 09:16
1

I recently had this error - what helped me was simply chmodding (755) the entire public_html directory recursively:

chmod -R 755 /path/to/public_html