How to add user to a group on Mac OS

  • Posted on: 9 January 2014
  • By: oon

Some folder permissions only allow specific group, for example group daemon.

Here's how to add your user to group daemon for example:


o:~ oonarfiandwi$ ls -al /Applications/XAMPP/xamppfiles/apps/drupal/htdocs/
ls: : Permission denied
o:~ oonarfiandwi$ sudo dseditgroup -o edit -a oonarfiandwi -t user daemon
o:~ oonarfiandwi$ ls -al /Applications/XAMPP/xamppfiles/apps/drupal/htdocs/
total 472
drwxr-x--- 29 daemon daemon 986 Aug 23 00:36 .
drwxr-xr-x 8 root admin 272 Aug 23 00:37 ..
-rw-r----- 1 daemon daemon 174 Aug 7 00:14 .gitignore
-r--r----- 1 daemon daemon 104 Aug 11 23:25 .htaccess
-rw-r----- 1 daemon daemon 89454 Aug 7 00:14 CHANGELOG.txt
-rw-r----- 1 daemon daemon 1481 Aug 7 00:14 COPYRIGHT.txt
-rw-r----- 1 daemon daemon 1717 Aug 7 00:14 INSTALL.mysql.txt
-rw-r----- 1 daemon daemon 1874 Aug 7 00:14 INSTALL.pgsql.txt
-rw-r----- 1 daemon daemon 1298 Aug 7 00:14 INSTALL.sqlite.txt
-rw-r----- 1 daemon daemon 17995 Aug 7 00:14 INSTALL.txt
-rw-r----- 1 daemon daemon 18092 Nov 1 2013 LICENSE.txt
-rw-r----- 1 daemon daemon 8542 Aug 7 00:14 MAINTAINERS.txt
-rw-r----- 1 daemon daemon 5382 Aug 7 00:14 README.txt
-rw-r----- 1 daemon daemon 9642 Aug 7 00:14 UPGRADE.txt
-rw-r----- 1 daemon daemon 6604 Aug 7 00:14 authorize.php
-rw-r----- 1 daemon daemon 720 Aug 7 00:14 cron.php
drwxr-x--- 49 daemon daemon 1666 Aug 23 00:36 includes
-rw-r----- 1 daemon daemon 529 Aug 7 00:14 index.php
-rw-r----- 1 daemon daemon 703 Aug 7 00:14 install.php
drwxr-x--- 70 daemon daemon 2380 Aug 23 00:36 misc
drwxr-x--- 43 daemon daemon 1462 Aug 23 00:36 modules
drwxr-x--- 5 daemon daemon 170 Aug 23 00:36 profiles
-rw-r----- 1 daemon daemon 1550 Aug 7 00:14 robots.txt
drwxr-x--- 13 daemon daemon 442 Aug 23 00:36 scripts
drwxr-x--- 6 daemon daemon 204 Aug 23 00:36 sites
drwxr-x--- 8 daemon daemon 272 Aug 23 00:36 themes
-rw-r----- 1 daemon daemon 19986 Aug 7 00:14 update.php
-rw-r----- 1 daemon daemon 2178 Aug 7 00:14 web.config
-rw-r----- 1 daemon daemon 417 Aug 7 00:14 xmlrpc.php
o:~ oonarfiandwi$ sudo dseditgroup -o edit -d oonarfiandwi -t user daemon
o:~ oonarfiandwi$ open -a /Applications/TextWrangler.app simple_article.info

Sometimes you need to restart your Terminal app before the permission refreshed.

-a command for add user to group

-d command for delete user from group

[1]http://superuser.com/questions/214004/how-to-add-user-to-a-group-from-ma...

Tags: 

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.