我已将 Joomla 站点的 public_html 从olduser
移至newuser
。我还将域名joomlasite.com
从olduser
移至newuser
;但当我joomlasite.com
以 的所有权访问该站点时newuser
,500 Internal Server Error
显示的是 。
注意:权限应该没有任何问题,因为使用 777 和 (644/755) 权限,我得到相同的结果。
die('Hello');
我甚至在顶部添加了index.php
但错误仍然存在。
根据 Niall Donegan 的评论,我检查了该文件。有用的内容是:
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
希望能够清楚理解。
有什么解决该问题的建议吗?
答案1
我敢打赌,/home/newuser/domains/joomlasite.com/public_html/ 中的文件归 root 所有。看起来您正在使用 suPHP,它将以拥有这些文件的用户身份运行 PHP 文件。min_uid 限制是为了确保 suPHP 不会无意中以 root 或其他系统用户身份运行。
最快的修复方法可能是运行以下命令:
chown -R newuser /home/newuser/domains/joomlasite.com/public_html/
错误的第二部分是由于 777 权限。修复方法可能是:
find /home/newuser/domains/joomlasite.com/public_html/ -type f -exec chmod 644 {} \+
这将找到 public_html 目录中的所有文件,并将权限更改为 644,这比共享系统上的 777 安全得多!!如果上述命令引发错误,请将 + 替换为 \;
答案2
我最近遇到了这个错误 - 对我有帮助的只是以递归方式 chmodding (755) 整个 public_html 目录:
chmod -R 755 /path/to/public_html