I've installed XAMPP on my Mac running Lion and I've set the DocumentRoot to Users/myusername/Sites. Apache runs as myusername/_www (user/group, 755) and everything is OK, my browser can access all pages without any problem.

BUT I'd like to increase security, as some HTML pages are to be accessed from the Internet, not only locally.

So I set Apache to run as _www/_www, I changed all permissions of my Users/myusername/Sites folders and files to _www/_www (755 too) and I restarted Apache.

The problem is : nothing works... All access is forbidden, and all I got is (13)Permission denied: access to / denied in the console.

And I can't understand why. What's going on?

  • Any other logs? Is it possible to enable verbose logging? Are you sure Apache is now running as _www (ps output?)? Are all parent directories of your Sites directory executable (traversable) by Apache? – Daniel Beck Dec 2 '11 at 18:21
  • Enabling verbose logging doesn't give more info. OS X's "Activity monitor" gives 7 httpd processes as _www and 1 httpd process as root. – JYF Dec 3 '11 at 12:39
  • Regarding the parent directories: Users is set to root/admin and myusername is set to myusername/admin. Is there something to be done there to allow Apache (running as _www) to access Users/myusername/Sites/? – JYF Dec 3 '11 at 12:44
  • What are the permissions (not just ownership) on /, /Users, /Users/myusername, and /Users/myusername/Sites? – Gordon Davisson Dec 3 '11 at 17:19
  • Sorry, I forgot them: they are 755 for all directories. – JYF Dec 3 '11 at 19:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.