How to take control of apache2 Webroot on OS X Mavericks?

0

Issue

I have an apache2 server enabled on my Mac running Mac OS X 10.9 using the default WebRoot /Library/WebServer/Documents. However, whenever I try to add, edit, or delete a file from that directory in Finder logged onto an Administrator account the files are “Locked” no matter what I attempt, including the chmod command and Mac’s Change Permission menu inside the “Get Info” window.

I was wondering if anyone knows of a way to allow an Admin or any specific User account to edit the directory without opening up the entire Filesystem to all users.

Thanks 🙂

Solution

The easiest way to enable modification of the files within /Library/WebServer/Documents is to change the permissions from your shell to allow all users of your system to write to the directory.

  1. Open Terminal.app
  2. Type the following:

    sudo chmod -R o+w /Library/WebServer/Documents

This command recursively changes the permissions using sudo.

The process of enabling the default apache installation has been relatively consistent since Apple removed the web sharing option in 10.7?. Here’s a gist with a handful of bits and pieces related to the setup process.

Answered By – Jessedc

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More