Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

albacor

macrumors newbie
Original poster
Mar 18, 2014
5
0
How would one achieve this using Terminal?

9rrvcz.jpg
 
Last edited:

pmau

macrumors 68000
Nov 9, 2010
1,569
854
WARNING, try on a small directory first:

chown -R skynet:staff <directory>
chmod -R u=rwX,g=rwX,o=rX <directory>

The capital X will only set the X bit on files that had it before.
Like all directories.

The chown for the ownership will only work as root, not as a regular user.
Unless the files already belong to you, than it's pointless.
 

albacor

macrumors newbie
Original poster
Mar 18, 2014
5
0
WARNING, try on a small directory first:

chown -R skynet:staff <directory>
chmod -R u=rwX,g=rwX,o=rX <directory>

The capital X will only set the X bit on files that had it before.
Like all directories.

The chown for the ownership will only work as root, not as a regular user.
Unless the files already belong to you, than it's pointless.

Yep, tried your solution, and it's all good!

You're the man! Thanks! :)
 

dyn

macrumors 68030
Aug 8, 2009
2,708
388
.nl
You can also use numericals instead of rwx. In this case chmod -R 775 <dir> does the same thing. Check out the manual for more info: man chmod.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.