0
votes

Suddenly my blog gives me this error below: (It works fine just an hour ago)

Forbidden

You don't have permission to access /blog/index.php on this server.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

My wordpress installation is in www.my-domain.com/blog. But I can still access the wp-admin.

I checked the permission using FTP and it's all correct (755 for directory and 644 for file)

I also tried deleting htaccess and let Wordpress re-create it by changing the permalink.

Some say it's hosting problem but I just create another Wordpress blog in /blog2 and it works fine.

Any solution? Thanks.

[EDIT]

I just realized that the index.php file permission is 00, but I can't change the permission through FTP. It says 550 Could not change perms on index.php: Permission denied. Any idea?

2
If you can get in the back end but the index.php file throws a 403 forbidden error, and the permissions are 644, then the user is likely CHOWN'd to ROOT by the host. Easiest way to test? Try changing the permissions of that file to anything else.Ohgodwhy
@Ohgodwhy Hi, I just realized that the index.php file permission is 00, but I can't change the permission through FTP. It says 550 Could not change perms on index.php: Permission denied. Any idea?hrsetyono
Yes, you should check the primary email associated with your hosting package or log into your host account and check the help desk; your host has likely made a ticket indicating why this has been performed.Ohgodwhy
@Ohgodwhy I deleted the index.php and uploaded the new one, now the permission is back to 644 and the site works fine. Thanks for your timehrsetyono
sigh, the idea is to get to the root cause of the issue otherwise what you've done is simply a bandaid solution and likely didn't address the issue what so ever. At least it's working, i suppose.Ohgodwhy

2 Answers

0
votes

The permission on /blog/index.php was set to 00. Changing it to 644 solves the problem.

In my case, I can't change the permission through FTP. So I deleted the index.php and uploaded a new fresh one.

0
votes

for 500 Internal server error, check your htaccess