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:
- Allow _www access to my Documents folder.
- Put the files I want to share outside of my Documents folder.
- 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!
1) Why not move your abc folder to somewhere public, and symlink it in your documents folder (and/or webfolder) if you want to be able to get to them there?
2) Another option would be to just set 701 on your document folder: listing is all that is required to get through.
3) Of course you can run an apache process / thread as 'you' (either as a seperate server config or by leveraging suexec), but that would hardly be advisable if the whole problem begins with the fact you don't want apache to have access to your other files...