Trying to set localhost on my mac and made following changes in /etc/apache2/httpd.conf
DocumentRoot "/Users/xxx/Documents/workspace/firstRepo/htdocs"
<Directory "/Users/xxx/Documents/workspace/firstRepo/htdocs">
I know it's something to do with the dir permission, so I followed suggestions online and ran the following commands:
find /Users/xxx/Documents/workspace -type d -exec chmod 755 {} \;
find /Users/xxx/Documents/workspace -type f -exec chmod 644 {} \;
No luck here. Can someone help me with this? Thanks.
Unix permissions are not just "permissions in destination", you need "search" permissions for the whole path until the last directory as the message from Apache says
Search permissions means, in a simple explanation, "x" is at least missing in directories so the unpriviledged user apache is using can go the whole path until reaching "/Users/xxx/Documents/workspace/firstRepo/htdocs".
You can try this command to make sure you have them:
namei -mol /Users/xxx/Documents/workspace/firstRepo/htdocs
Only other case of not being able to access where permissions are correct is if SELinux is controlling access to those directories.
The Apache wiki has a document about this since many people get confused about how permissions work under Unix. Permissions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With