How do I get Apache 2 to read this directory?

Posted by Mike on Server Fault See other posts from Server Fault or by Mike
Published on 2010-06-05T14:24:02Z Indexed on 2010/06/05 15:42 UTC
Read the original article Hit count: 176

Filed under:
|
|
|

I'm on Mac OSX and i I have apache2 installed via MacPorts, running as the _www user.

I have some files I want to serve in the /Users/Me/Documents/abc folder.

Right now, though, the permissions of /Users/Me/Documents are 700. So, _www can't get in, even if abc is chmod 777.

I recognize the following options:

  1. Allow _www access to my Documents folder.
  2. Put the files I want to share outside of my Documents folder.
  3. Hard-link the files outside of my Documents folder, and point apache to the hard links.

None of these solutions are acceptable to me, however. I don't feel safe allowing _www access to my entire Documents folder. I really want to keep the files in my Documents folder for other reasons. The files are changing all the time, so hard-linking would not always reflect the right file structure, and, as I understand it, you can't hard-link a directory (though, if you could, that would solve it).

Any ideas for a solution? Is there a way to run a few httpd processes as my user account so it can get in there?

Or, is there some way to hard-link a directory, or some way to get httpd to follow a symlink past a directory that is 700 not owned by _www?

Thanks!

© Server Fault or respective owner

Related posts about apache

Related posts about macosx