osx - Correct owner/group/permissions for Apache 2 site files/folders under Mac OS X? -


it's hard find mac-specific answers question on web, i'm hoping out there can put 1 rest me? permissions screwed on sites , i'm not sure how fix them without slamming recursive 777 on quite incorrect.

thanks!

this restrictive , safest way i've found, explained here hypothetical ~/my/web/root/ directory web content:

  • for each parent directory leading web root (e.g. ~/my, ~/my/web, ~/my/web/root):
    • chmod go-rwx dir (nobody other owner can access content)
    • chmod go+x dir (to allow "users" including _www "enter" dir)
  • sudo chgrp -r _www ~/my/web/root (all web content group _www)
  • chmod -r go-rwx ~/my/web/root (nobody other owner can access web content)
  • chmod -r g+rx ~/my/web/root (all web content readable/executable/enterable _www)

all other solutions leave files open other local users (who part of "staff" group being in "o"/others group). these users may freely browse , access db configurations, source code, or other sensitive details in web config files , scripts if such part of content. if not issue you, means go 1 of simpler solutions.


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -