//Adds new user group "dev" using Mac directory service command line utility sudo dscl . -create /groups/dev //Assigns some group id for the newly created group sudo dscl . -append /groups/dev gid 2111 //Assigns password for the group sudo dscl . -append /groups/dev passwd "xxxxx" //Adds user with "username" to group "dev" sudo dseditgroup -o edit -a username -t user dev //List all the group available, and extract the newly created group 2111 sudo dscacheutil -q group | grep 2111 //To check whether the above entered information are proper, scroll the long list to find the dev group sudo dscl . readall /groups //Add the directory to dev group sudo chown -R :dev /path/to/directory/ //Assigns read/write permission for owner and the members of the group sudo chmod -R 770 /path/to/directory/