在我的新 Big Sur Mac 上,我将 Apache 文档根目录放在外部驱动器上。
当我访问它时,日志显示没有权限:http://localhost/
我尝试了对另一个用户有用的方法:sudo chmod -R _www mydirectory
我仍然收到错误:
文件权限拒绝服务器访问:/Volumes/SSD1/Sites/index.html
此外,ls不显示 chmod 工作:
/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$
请注意,如果我将相同的目录树放在我的主目录下,它就可以工作(当然,对httpd.conf进行相应的更改。
想法?