I am new to mac and running a website through apache server. The code for my application is being accessed by the _www user, so I set the ownership to _www user but then when I try to edit a file from netbeans I have to give the ownership back to my user. I dont want to use the my application or netbeans from the root user but is there a way I can give permission to both myuser and _www user to a directory?


  • If you open Finder help and search for "set permissions" you should see this article. help.apple.com/machelp/mac/10.11/… Could you edit this to explain what specifically you are unclear about?
    – bmike
    Jan 21 '16 at 18:27

To give a user or a group full access to a folder use

chmod +a "user_name allow list,add_file,search,delete,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown,file_inherit,directory_inherit" /path/to/folder

You may replace user_name by a group_name.

To remove the ACL simply replace the +a by -a.

It's similar for a single file - the attributes are different though:

chmod +a "user_name allow read,write,execute,delete,append,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown" /path/to/file

Insert a -R for all files in a folder:

chmod -R +a "user_name allow read,...
  • But I think it won't work if the owner is root. Will it? Feb 25 '16 at 13:46
  • @RahulSharma Then you may have to prepend sudo
    – klanomath
    Feb 25 '16 at 14:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .