Unable to check htaccess file, ensure it is readable

WordPress, Joomla, and Drupal are common open source CMS systems that run typically in LAMP environments. They rely on file and folder permissions to allow users to upload graphics and content to your CMS without having knowledge of FTP or other file transfer methods.

A common issue, one that I got tonight, is that you can upload an image through your system, you log into FTP or your Control Panel and you see the file. You can download your file via FTP. But you cannot actually view your file by a direct link. If it was an image, the image would break on an included web page. This can help for many other systems as well.

Log File
First off, we are going to assume that you are using Linux and Apache.

The first thing you need to do is check your logs: /etc/httpd/logs/error_log
If you have SSH access, you can type “tail -f /etc/httpd/logs/error_log” or “vi /etc/httpd/logs/error_log” and scroll to the very bottom.

This could also be found in: /var/log/httpd/error_log — all depends on how your server is setup.

In cPanel, you can find your logs right on your cPanel main page under “Logs” | “Error Log”

Error Message
This is the error message I am assuming you are getting.

  1. [Fri Jan 11 23:16:27 2013] [crit] [client] (13)Permission denied: /home/username/public_html/wp-content/uploads/2013/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

Basically, this means that your permissions are not set on your folder that leads up to your .htaccess. If you do have a .htaccess, it means that you have bad permissions on your .htaccess file. This example means that either “/home/username/public_html/wp-content/uploads/2013″ or “/home/username/public_html/wp-content/uploads/2013/.htaccess” has bad permissions

If the error is:

  1. [Fri Jan 11 23:16:27 2013] [crit] [client] (13)Permission denied: /home/username/public_html/wp-content/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

Your bad permissions would be on “/home/username/public_html/wp-content/” or “/home/username/public_html/wp-content/.htaccess”

To Solve
You simply need to navigate to your culprit, in SSH or FTP, and correct your permissions. They need to look like this (using “ls -l”) drwxr-xr-x, or this (in FTP) 755.

You can do this through an FTP interface or by navigating and typing:

  1. chmod 755 /folder/or/file.ext

That’s it.

About Phillihp Harmon

I'm Phillihp. My name can be spelled the same way forwards and backwards, so can my posts... if you wish. I'm out here exploring, learning, and sharing what I find. This is more for fun and personal growth, I aim to be as consistent as possible, so check back daily!
This entry was posted in ***, DIY, Internet, Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>