Reputation: 332
On my new Big Sur Mac, I put the Apache document root on an external drive.
When I access it, the log showed no permissions: http://localhost/
I tried what worked for another user: sudo chmod -R _www mydirectory
I still get the error:
file permissions deny server access: /Volumes/SSD1/Sites/index.html
Also, an ls doesn't show the chmod working:
/Volumes/SSD1$ sudo chgrp -R _www Sites
/Volumes/SSD1$ ls -ld Sites Sites/index.html
drwxr-xr-x 19 John staff 608 Feb 24 01:13 Sites
-r--r--r-- 1 John staff 833 Feb 24 01:13 Sites/index.html
/Volumes/SSD1$
Note that if I put that same directory tree under my home directory, it works (with corresponding changes to httpd.conf, of course.
Thoughts?
Upvotes: 0
Views: 1315
Reputation: 332
I finally solved it. It took two tricks - one MacOS, and one Apache:
A getinfo on the drive showed that "Ignore ownership on this volume" was set. I fixed that. Note - this is on the very bottom of the Info dialog.
As mentioned in an answer to another question - I changed the group (using the shell in terminal) on everything in my directory to _www:
chgrp -R _www Sites
Upvotes: 1