本文介绍了写权限 - 本地主机 - Mac OSX版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的Mac世界,刚刚建立我的网络服务器。我用下面的指南:http://echo.co/blog/os-x-107-lion-development-native-mamp-mysql-installer

I'm new to the mac world and have just been setting up my webserver. I used the following guide: http://echo.co/blog/os-x-107-lion-development-native-mamp-mysql-installer

我已经调到我的网站和数据库,一切都很pretty好。我唯一​​的问题是随写权限。比如有一个需要被写入到一个配置文件,我不得不点击右键,去获取信息,然后允许读取和放大器;编写人员和每一个人。

I've transferred my sites and databases and everything is going pretty well. The only problem I have is with the writing permissions. For example there is a config file that needs to be written to, and I had to right click, go to Get Info then enable read & write for staff and everyone.

我不能手动经历和启用这些写入权限每个文件/文件夹。我并不需要为此使用WAMP,并提出发展快得多。

I can't manually go through and enable these write privileges for every file/folder. I didn't need to do this using WAMP and made development much quicker.

于是想约2可能的解决方案:
一)我的用户帐户添加到白名单的本地主机,使644的权限就足矣
b)将写权限递归

So wondering about 2 possible solutions:a) add my user account to a whitelist for the localhost so that 644 privileges are sufficientb) set the write privileges recursively

推荐答案

我找到了最好的解决办法是改变Apache用户和组的设置。这些指令可以在这里找到:http://paulmason.name/item/change-apache-user-group-in-lion-os-x

I found the best solution was to change the apache user and group settings. The instructions can be found at: http://paulmason.name/item/change-apache-user-group-in-lion-os-x


  1. 打开终端,输入

  1. Open Terminal and Enter

sudo nano /private/etc/apache2/httpd.conf


  • 查找和更改的http.conf code从

  • Find and change http.conf code from

    User _www
    Group _www
    

    User your_mac_username
    Group staff
    

    请注意:与早期版本如豹,利用工作人员的工作人员。您可以通过键入ID和击中终端输入get您的用户名和组

    Note: With earlier versions such as Leopard, capitalize staff to Staff. You can get your username and group by typing "id" and hitting enter in terminal

    重启Apache

    sudo apachectl restart
    


  • 这篇关于写权限 - 本地主机 - Mac OSX版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

    08-19 23:10