pcfg_openfile

pcfg_openfile: unable to check htaccess file

WordPress
WordPress

WordPress kinda drove me mad yesterday. After sorting out the move of FSI to a VPS and making sure that everything works fine, i noticed that the thumbnails in WordPress were all broken. Same for the images in the galleries, neither did the thumbnails show nor did the images inside the galleries load properly. Browser displayes something along the lines of “The requested content cannot be loaded. Please try again later”. I checked server logs and found a bazillion of entries about clients being denied because permission to access a particular file was denied. It was pretty weird as i thought i didn’t touch WordPress, but at some point i must have. Here is an excerpt of the error log for you. Despite it saying [crit] it wasn’t really critical as the error just caused the thumbnails and galleries to malfunction. Everything else was working fine.

As you can see, every incoming request was denied. The actual page was loading fine, it was just that images were broken and posts and galleries looked pretty odd because of that. Thank god the visitors didn’t notice much, unless they were coming for a particular image to look at hehe, then they were out of luck.  I did some basic troubleshooting, checked file permissions on the .htaccess which were fine and the webserver should have been able to read/access the file just fine, yet it wasn’t. Dunno how many times i looked at the permissions of the .htaccess file, i even restored older versions of the files from a backup but the error didn’t go away.

It got late and i just gave up on fixing it the day i moved FSI. Next morning i had another look, trying to sort it and noticed that, for some reason, the permissions on the /wp-content/ folder and a few other folders were changed to CHMOD 750 instead of CHMOD 755. I changed them back to 755 and, lo and behold, the site started working fine again. Thumbnails showed up without problems, galleries were working fine again and no more entries in the error logs about pcfg_openfile: unable to check htaccess file. Seems that did the trick. I still wonder why the permissions changed, i guess i messed them up when changing usergroups/userids for the FSI files. Probably was the bash script i ran to change gid/uid for the FSI import to work (i didn’t touch anything else, so i am sure i messed up the bash script i wrote to change perms/uid/gid for FSI).

If you encounter the same error message, then pay attention to the CHMOD values for your files/folder mentioned in the path and you will be able to fix it alot quicker than me :)

Be the first to comment

Leave a Reply

Your email address will not be published.


I confirm

*