Apache 2的网站文件/文件夹正确的所有者/组/权限在Mac OS X? [英] Correct owner/group/permissions for Apache 2 site files/folders under Mac OS X?

查看:374
本文介绍了Apache 2的网站文件/文件夹正确的所有者/组/权限在Mac OS X?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是很难找到特定于Mac的回答在网络上这个问题,所以我希望有人在那里可以把这个休息给我吗?我的权限是在我的网站搞砸了,我不知道如何解决这些问题,而不只是一切这是很显然是不正确地一声递归777。

It's hard to find Mac-specific answers to this question on the web, so I'm hoping someone out there can put this one to rest for me? My permissions are screwed up on my sites and I'm not sure how to fix them without just slamming a recursive 777 on everything which is quite obviously incorrect.

谢谢!

推荐答案

这是最严格,最安全的方式,我发现,这里解释了假想〜/我的/ WEB /根/ 为您的网站内容目录:

This is the most restrictive and safest way I've found, as explained here for hypothetical ~/my/web/root/ directory for your web content:


  • 有关领导到Web根每个父目录(例如〜/我的〜/我的/ WEB 〜/我的/ WEB /根):

    • 搭配chmod去-RWX DIR (比其他业主可以访问内容无人)

    • 去搭配chmod + X DIR (允许用户,包括_www为进入目录)

    • For each parent directory leading to your web root (e.g. ~/my, ~/my/web, ~/my/web/root):
      • chmod go-rwx DIR (nobody other than owner can access content)
      • chmod go+x DIR (to allow "users" including _www to "enter" the dir)

      所有其他的解决办法离开档案开放给其他本地用户(谁是员工组的一部分,以及明显的O/人组是)。然后,这些用户可以自由浏览和访问数据库的配置,源$ C ​​$ c或在Web配置文件等敏感细节和脚本,如果如你的内容的一部分。如果这不是你的问题,然后通过各种手段去与简单的解决方案之一。

      All other solutions leave files open to other local users (who are part of the "staff" group as well as obviously being in the "o"/others group). These users may then freely browse and access DB configurations, source code, or other sensitive details in your web config files and scripts if such are part of your content. If this is not an issue for you, then by all means go with one of the simpler solutions.

      这篇关于Apache 2的网站文件/文件夹正确的所有者/组/权限在Mac OS X?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆