shane
shane

Reputation: 1863

Apache cannot access folders in my home directory

I am getting this error

Warning: include(/home/me/some_folder): failed to open stream: Permission denied in /var/www/html/my_web.php on line 6

I have tried modifying permissions like this

chown apache /home/me/some_folder
chmod 755 /home/me/some_folder

I still cannot get in! What am I doing wrong?

EDIT

I am running an instance of linux with apache

Upvotes: 1

Views: 1313

Answers (2)

shane
shane

Reputation: 1863

I got it to work by

chmod 755 /home/me/

I snuck around online a bit more and found an answer to a similar question on CentOS, and tried it

If someone could explain why, or security behind this, that would be greatly appreciated

Thanks for your help

Upvotes: 0

Luc M
Luc M

Reputation: 17314

You have to give access to all files in /home/me/some_folder

chown -R apache /home/me/some_folder
chmod -R 755 /home/me/some_folder

Upvotes: 1

Related Questions