Apache';禁止的';Mac~/Sites文件错误

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Apache';禁止的';Mac~/Sites文件错误相关的知识,希望对你有一定的参考价值。

When Apache under OS X throws 'Forbidden' errors on files under the ~/Sites path, and the error log report 'Permission denied: access to /somefile/blah failed because search permissions are missing on a component of the path', check a missing Other Execute permission along the entire path.

"If you want someone to have access to a file in a particular folder, that user must have "search" permission (the "x") on all of the folders along the path from the top of the drive down to the folder where the file is. And then the file itself must have "read" permission for that user. And if you want someone to be able to see what files are in a particular folder, that folder must have "read" permission for that user."
  1. ##To see the permissions of a folder, you need to use the "-d" option to 'ls' as well as the "-l" option
  2. ls -ld ~/Sites
  3. # drwxr-x--- 14 cczona staff 476B Jan 19 10:48 /Users/cczona/Sites/
  4.  
  5. ##Apache runs as user/group 'www', so typically it needs 'Other' read and execute permissions
  6. chmod o+rx ~/Sites
  7. # drwxr-xr-x 14 cczona staff 476B Jan 19 10:48 /Users/cczona/Sites/

以上是关于Apache';禁止的';Mac~/Sites文件错误的主要内容,如果未能解决你的问题,请参考以下文章

Mac OS X中的sed替换

获取Apache版本

Apache:将IP';s(而不是X)重定向到[URL]

APACHE,HTACCESS:afficher des pages d';erreurs personnalisÃ

从IP地址获取ARP MAC

nvram(详细Mac OS启动)