Write Privileges - localhost - Mac OSX

前端 未结 5 1804
北荒
北荒 2020-12-07 11:47

I\'m new to the mac world and have just been setting up my webserver. I used the following guide: https://alan.ivey.dev/posts/2011/os-x-10.7-lion-development-native-mamp-wit

5条回答
  •  长情又很酷
    2020-12-07 12:32

    I recommend settings the Write privileges recursively for your web root.

    You can do this via the console / terminal using chmod -R 774 /my/web/root. For me, the owner and group is set to: www-data:myUserName, which can be set by using chown. Don't forget to check who's your web user first.

    Edit: For better understanding, why you don't have access:

    Chmod 774, each number stands for specific rights: user, group, others. If the user is set to www-data and the group to www-data (most users on a Unix system are in a group that's named by their username). So, if you're not in the group www-data you either have to join it, or you have to change owner (chown) or you have to change the permissions (chmod). There are several tutorials out there, for more information.

提交回复
热议问题