Apache, permission denied when trying to access site

To give a bit of history. I had an internal server setup running centos, apache, php and MySQL. Something went wrong with the server so I installed a new hard drive, installed centos, apache, php and mysql again.

I setup the original drive as a second drive and copied across the contents of my web folder, as well as the following two apache config files;

I've set the permissions of all files and folders in the web root to 755. All files for my web server are stored in /home/webdev/ with the 755 permissions being set on the webdev folder and all sub files and folders.

I've checked the error_log, and this is what I get;

[core:crit] [pid 4333] (13)Permission denied: [client] AH00529: /home/webdev/public_html/myfolder/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/webdev/public_html/myfolder/' is executable, referer: http://mysubdomain.subdomain.com/

Here's the output of 'ls -al' on the myfolder path;

drwxr-xr-x. 6 webdev apache   4096 Jan 23 09:54 .
drwxr-xr-x. 8 webdev apache     86 Jan 22 18:02 ..
drwxr-xr-x. 5 webdev apache     76 Jan 22 18:02 app
-rwxr-xr-x. 1 webdev apache     64 Jan 22 18:02 composer.json
drwxr-xr-x. 2 webdev apache     60 Jan 22 18:02 email
-rwxr-xr-x. 1 webdev apache   6518 Jan 22 18:02 favicon.ico
drwxr-xr-x. 6 webdev apache     79 Jan 22 18:02 framework
-rwxr-xr-x. 1 webdev apache    445 Jan 22 18:02 .htaccess
-rwxr-xr-x. 1 webdev apache    928 Jan 22 18:02 .htaccess_live
-rwxr-xr-x. 1 webdev apache     46 Jan 22 18:02 index.php
-rwxr-xr-x. 1 webdev apache  46177 Jan 22 18:02 php.in
drwxr-xr-x. 4 webdev apache     56 Jan 22 18:02 vendor

Open in new window

I don't understand why I'm getting permission denied.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Patrick BogersDatacenter platform engineer LindowsCommented:

Could you try?       chmod a+rx /home/webdev/public_html/myfolder/
(this will give apache execute rights which it needs)
SheppardDigitalAuthor Commented:
I'm afraid I'm still getting 'Permission denied' in the apache error log.

I've even tried setting permissions on the folder to 777 and that didn't work either.
SheppardDigitalAuthor Commented:
Running 'setenforce 0' fixes the problem.

As it's a development server, I'm happy with that.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SheppardDigitalAuthor Commented:
Resolved issue myself
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.