Error 500 Internal Server Error
Error 500 Internal Server Error
I have a very big problem, deleted the contents of my public_html folder to make some changes, and when put back the files on the server, comelou to show the error 500, use a Wordpress site.
The public_html folder with this permission 755 I did a test erasing all wordpress and putting a index.php file with the message "Test" and the problem still remains. html files work normally. erro_log
.htaccess file
Can anyone help me in this problem?
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@example.com.br to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.The public_html folder with this permission 755 I did a test erasing all wordpress and putting a index.php file with the message "Test" and the problem still remains. html files work normally. erro_log
SoftException in Application.cpp:357: UID of script "/home/spartanas/public_html/index.php" is smaller than min_uid.htaccess file
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ " [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Can anyone help me in this problem?
-
Make sure the public_html folder is set to be owned by user:nobody and set to 750 permissions, then make sure all files inside of it are also owned by the user. The error in the Apache log indicates that you probably left the files owned by root. 0 -
Hello, You should also check permissions of 'index.php' file. It should be $user:$user 0 -
Hello, What are the ownership values on the public_html directory? You can check with a command such as: stat /home/$user/public_html
Also, is Mod_Ruid2 enabled on the system? You can verify this by running the following commands to see if it's installed and enabled with a supported PHP handler such as DSO:rpm -qa|grep ea-apache24-mod_ruid2 /usr/local/cpanel/bin/rebuild_phpconf --current
Thank you.0 -
Hello, What are the ownership values on the public_html directory? You can check with a command such as:
stat /home/$user/public_html
Also, is Mod_Ruid2 enabled on the system? You can verify this by running the following commands to see if it's installed and enabled with a supported PHP handler such as DSO:rpm -qa|grep ea-apache24-mod_ruid2 /usr/local/cpanel/bin/rebuild_phpconf --current
Thank you.
Hi, Thanks for you response.root@img1 [~]# stat /home/spartanas/public_html File: `/home/spartanas/public_html' Size: 4096 Blocks: 8 IO Block: 4096 directory Device: 800h/2048d Inode: 53904 Links: 6 Access: (0775/drwxrwxr-x) Uid: ( 501/spartanas) Gid: ( 512/spartanas) Access: 2014-09-02 08:37:02.000000000 -0300 Modify: 2016-10-24 16:57:04.220479542 -0200 Change: 2016-10-24 19:56:47.758270640 -0200
Androot@img1 [~]# rpm -qa|grep ea-apache24-mod_ruid2 root@img1 [~]# /usr/local/cpanel/bin/rebuild_phpconf --current Available handlers: suphp dso cgi none DEFAULT PHP: 5 PHP4 SAPI: none PHP5 SAPI: suphp SUEXEC: enabled RUID2: not installed0 -
Hello, thanks for your reply, how can I check it? @vanessa 0 -
Hello, You should also check permissions of 'index.php' file. It should be $user:$user
Ol" Patrick, como posso verificar a permiss"o do arquivo? j" tentei criar novos arquivos, nomes diferentes, pastas diferentes e mesmo assim o problema continua.0 -
root@img1 [~]# stat /home/spartanas/public_html File: `/home/spartanas/public_html' Size: 4096 Blocks: 8 IO Block: 4096 directory Device: 800h/2048d Inode: 53904 Links: 6 Access: (0775/drwxrwxr-x) Uid: ( 501/spartanas) Gid: ( 512/spartanas)
Change your public_html permission and ownership with below command and check your site again.chmod 750 /home/spartanas/public_html chwon spartanas:nobody /home/spartanas/public_html0 -
Change your public_html permission and ownership with below command and check your site again.
chmod 750 /home/spartanas/public_html chwon spartanas:nobody /home/spartanas/public_html
I did the following command:chmod 750 /home/spartanas/public_html
Now the page that displays is:Forbidden You do not have permission to access / on this server. Server Unable to read .htaccess file, denying access to be safe Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
I tried this command also:chwon spartanas:nobody /home/spartanas/public_html
the server gave me the following error:-bash: chwon: command not found0 -
-bash: chwon: command not found
Its not chwon, its chown. More Info: linux.die.net/man/1/chown0 -
Ol" Patrick, como posso verificar a permiss"o do arquivo? j" tentei criar novos arquivos, nomes diferentes, pastas diferentes e mesmo assim o problema continua.
Ol", Pode ser com o comandols -l /home/spartanas/public_html/index.php
O resultado deve ser algo como:-rw-r--r-- 1 spartanas spartanas 213123 Sep 5 15:23 index.php
Como vc est" criando estes arquivos? Via ssh? Se vc est" fazendo isso como root, as permiss"es v"o ficar erradas =/ Ou vc acessa via ssh com o usu"rio spartanas, ou crie estes arquivos via FTP, ou via File Manager. Assim as permiss"es v"o ficar corretas. Por SSH, vc vai ter que executar o comando chown spartanas:spartanas $nomedoarquivo sempre que criar um arquivo novo. -- You can use ls command:ls -l /home/spartanas/public_html/index.php
As server response, you should get something like:-rw-r--r-- 1 spartanas spartanas 213123 Sep 5 15:23 index.php
How are you creating these files? If through SSH you will need to execute chown command every time you create a new file. To prevent this 'job' you should create new files locally and send it through FTP connection, or directly via cPanel File Manager.0 -
Now the page that displays is: Forbidden You do not have permission to access / on this server. Server Unable to read .htaccess file, denying access to be safe
Verifique as permiss"es do arquivo .htaccess. Elas devem ser spartanas:spartanas e 644. -- You should also check .htaccess file permission. It should be chowned to spartanas:spartanas and chmoded as 644.0 -
Ol", Pode ser com o comando
ls -l /home/spartanas/public_html/index.php
O resultado deve ser algo como:-rw-r--r-- 1 spartanas spartanas 213123 Sep 5 15:23 index.php
Como vc est" criando estes arquivos? Via ssh? Se vc est" fazendo isso como root, as permiss"es v"o ficar erradas =/ Ou vc acessa via ssh com o usu"rio spartanas, ou crie estes arquivos via FTP, ou via File Manager. Assim as permiss"es v"o ficar corretas. Por SSH, vc vai ter que executar o comando chown spartanas:spartanas $nomedoarquivo sempre que criar um arquivo novo. -- You can use ls command:ls -l /home/spartanas/public_html/index.php
As server response, you should get something like:-rw-r--r-- 1 spartanas spartanas 213123 Sep 5 15:23 index.php
How are you creating these files? If through SSH you will need to execute chown command every time you create a new file. To prevent this 'job' you should create new files locally and send it through FTP connection, or directly via cPanel File Manager.
Puts Velho, hoje de manh" eu estava no trem pensando justamente isso. Ser" que o problema n"o esta sendo porque estou fazendo tudo via ssh pelo usu"rio root, tanto no Filezilla, quanto no SmarTTY. Vou apagar todos os arquivos e fazer o procedimento logado com o usu"rio spartanas. Assim vejo o que vai dar. Obrigado pelo toque velho, te aviso sobre o que deu quando eu fizer isso.0 -
Verifique as permiss"es do arquivo .htaccess. Elas devem ser spartanas:spartanas e 644. -- You should also check .htaccess file permission. It should be chowned to spartanas:spartanas and chmoded as 644.
Vou apagar o arquivo .htaccess e enviar pelo usu"rio spartanas direto para corrigir tamb"m as permiss"es.0 -
@Patrick Heinz Recoloquei todos os arquivos, usando o usu"rio spartanas, mas o problema continua. 0 -
Estranho. Acesse o site e acompanhe os logs do arquivo erro_log, com o seguinte comando tail -f /usr/local/apache/logs/error_log
Poste o resultado. Outra coisa, o erro ainda " "Server Unable to read .htaccess file, denying access to be safe"? Tem como me mandar o site por PM? -- You can check the apache's error_log using the following command:tail -f /usr/local/apache/logs/error_log0 -
Estranho. Acesse o site e acompanhe os logs do arquivo erro_log, com o seguinte comando
tail -f /usr/local/apache/logs/error_log
Poste o resultado. Outra coisa, o erro ainda " "Server Unable to read .htaccess file, denying access to be safe"? Tem como me mandar o site por PM? -- You can check the apache's error_log using the following command:tail -f /usr/local/apache/logs/error_log
Error LogLast login: Tue Oct 25 15:10:35 2016 from 152.249.252.174 root@img1 [~]# tail -f /usr/local/apache/logs/error_log [Tue Oct 25 15:54:03.369350 2016] [core:crit] [pid 28440] (13)Permission denied: [client 200.162.xxx.xx:15904] AH00529: /home/spartanas/ public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/spartanas/public_html/' is exe cutable, referer: http://hom.example.com.br/ [Tue Oct 25 15:54:03.369448 2016] [core:crit] [pid 28440] (13)Permission denied: [client 200.162.xxx.xx:15904] AH00529: /home/spartanas/ public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/spartanas/public_html/' is exe cutable, referer: http://hom.example.com.br/ [Tue Oct 25 15:54:05.234860 2016] [core:crit] [pid 28440] (13)Permission denied: [client 200.162.xxx.xx:15904] AH00529: /home/spartanas/ public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/spartanas/public_html/' is exe cutable [Tue Oct 25 15:54:05.234964 2016] [core:crit] [pid 28440] (13)Permission denied: [client 200.162.xxx.xx:15904] AH00529: /home/spartanas/ public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/spartanas/public_html/' is exe cutable [Tue Oct 25 15:54:06.528345 2016] [core:crit] [pid 28440] (13)Permission denied: [client 200.162.xxx.xx:15904] AH00529: /home/spartanas/ public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/spartanas/public_html/' is exe cutable, referer: http://hom.example.com.br/ [Tue Oct 25 15:54:06.528442 2016] [core:crit] [pid 28440] (13)Permission denied: [client 200.162.xxx.xx:15904] AH00529: /home/spartanas/ public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/spartanas/public_html/' is exe cutable, referer: http://hom.example.com.br/ [Tue Oct 25 15:54:07.531921 2016] [core:crit] [pid 28440] (13)Permission denied: [client 200.162.xxx.xx:15904] AH00529: /home/spartanas/ public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/spartanas/public_html/' is exe cutable [Tue Oct 25 15:54:07.532057 2016] [core:crit] [pid 28440] (13)Permission denied: [client 200.162.xxx.xx:15904] AH00529: /home/spartanas/ public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/spartanas/public_html/' is exe cutable [Tue Oct 25 15:54:10.906327 2016] [core:crit] [pid 28440] (13)Permission denied: [client 200.162.xxx.xx:15904] AH00529: /home/spartanas/ public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/spartanas/public_html/' is exe cutable, referer: http://hom.example.com.br/ [Tue Oct 25 15:54:10.906425 2016] [core:crit] [pid 28440] (13)Permission denied: [client 200.162.xxx.xx:15904] AH00529: /home/spartanas/ public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/spartanas/public_html/' is exe cutable, referer: http://hom.example.com.br/
O Erro " o mesmo ainda, voc" pode ver no link hom.spartanas.com.br0 -
Ok, parece que " tudo referente " permiss"es ainda. Poste o resultado do comando: namei -l /home/spartanas/public_html/.htaccess
Outra coisa, o dom"nio foi criado com o endere"o hom.spartanas.com.br mesmo? Ou ele " um subdom"nio criado depois. Se for um subdom"nio, as permiss"es s"o nesta pasta que vc indicou quando ele foi criado. Mas de qualquer forma o erro " no in"cio. Resumindo, as permiss"es devem ser algo parecido com isso:root@host ~]# namei -l /home/spartanas/public_html/.htaccess f: /home/spartanas/public_html/.htaccess drwxr-xr-x root root / drwxr-xr-x root root home drwx--x--x spartanas spartanas spartanas drwxr-xr-x spartanas spartanas public_html -rw-r--r-- spartanas spartanas .htaccess
drwxr-xr-x = 755 drwx--x--x = 711 -rw-r--r-- = 6440 -
Ok, parece que " tudo referente " permiss"es ainda. Poste o resultado do comando:
namei -l /home/spartanas/public_html/.htaccess
Outra coisa, o dom"nio foi criado com o endere"o hom.spartanas.com.br mesmo? Ou ele " um subdom"nio criado depois. Se for um subdom"nio, as permiss"es s"o nesta pasta que vc indicou quando ele foi criado. Mas de qualquer forma o erro " no in"cio. Resumindo, as permiss"es devem ser algo parecido com isso:root@host ~]# namei -l /home/spartanas/public_html/.htaccess f: /home/spartanas/public_html/.htaccess drwxr-xr-x root root / drwxr-xr-x root root home drwx--x--x spartanas spartanas spartanas drwxr-xr-x spartanas spartanas public_html -rw-r--r-- spartanas spartanas .htaccess
drwxr-xr-x = 755 drwx--x--x = 711 -rw-r--r-- = 644
f: /home/spartanas/public_html/.htaccess dr-xr-xr-x root root / drwx--x--x root root home drwx--x--x spartanas spartanas spartanas drwxr-x--- spartanas spartanas public_html -rw-r--r-- spartanas spartanas .htaccess
N"o " um subdom"nio n"o, esse " um servidor de testes e programa""o, um servidor de homologa""o.0 -
Cara, Por acaso o /home " uma montagem nfs, ou tipo de parti""o diferente do / ? J" aconteceu isso comigo depois de um upgrade do cPanel. Executa um chmod 755 /home
Vai funcionar. Tua /home/ est" com permiss"o 711, e n"o 755 ;)0 -
chmod 755 /home
Vai funcionar. Tua /home/ est" com permiss"o 711, e n"o 755 ;)
Problema solucionado. Troquei as permiss"es das pastas public_html /home e voltou a funcionar sem problemas. segue as permiss"es, conforme orienta""o acima. drwxr-xr-x = 755 drwx--x--x = 711 -rw-r--r-- = 644Cara, Por acaso o /home " uma montagem nfs, ou tipo de parti""o diferente do / ? J" aconteceu isso comigo depois de um upgrade do cPanel. Executa um
0 -
@cPanelMichael. Solved changing permissions of /home folder from 711 to 755. 0 -
I'm happy to see the issue is now resolved. Thank you for updating this thread with the outcome. 0
Please sign in to leave a comment.
Comments
22 comments