Permission denied when editing files in /Library/WebServer/Documents I've added a webroot directory and file within /Library/WebServer/Documents. The web site/file displays fine but when I try edit it within PHPStorm or when using nano (without sudo) I get file permission issues.

The parent directory of the webroot is owned by root:wheel and has 777 permissions.

Within the web directory mysite the permissions and owners are as follows:

jcogan@/Library/WebServer/Documents/mysite

drwxrwxrwx@ 15 root    wheel   480 11 May 10:25 .
drwxrwxrwx  11 root    wheel   352 22 May 13:17 ..
-rwxrwxrwx@  1 jcogan  staff  6148  8 May 14:16 .DS_Store
drwxrwxrwx@ 43 jcogan  staff  1376 22 May 14:03 web


Then in /web

drwxrwxrwx@ 43 jcogan  staff        1376 22 May 14:03 .
drwxrwxrwx@ 15 root    wheel         480 11 May 10:25 ..
-rwxrwxrwx@  1 jcogan  staff        6148 25 Apr 17:25 .DS_Store
-rwxrwxrwx   1 jcogan  staff          18 22 May 14:12 phpinfo.php


Are my owners configured wrong ?
Have you checked ACL's? Try ls -ale to see if there are any.