Solved - (13) Permission denied: .htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

I don't recall how the permissions got messed up on the server and the site would not load. The error was 403 - permission denied.

 

Upon checking the logs, I found that the error was:

"(13)Permission denied: /var/www/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable"

I tried to connect using FTP and no files or folders were visible.

Here's what helped:

changed to root user and ran the following commands on the server:

usermod -G ubuntu

usermod -G apache

chmod -R 755 /var/www/

 

Checked ftp client again and all the files were visible. I refreshed the page and the site loaded fine.

The issue is resolved :)