Resolved Batchmod using terminal?

Discussion in 'OS X Mavericks (10.9)' started by albacor, Jul 25, 2014.

  1. albacor, Jul 25, 2014
    Last edited: Jul 25, 2014

    albacor macrumors newbie


    Mar 18, 2014
  2. pmau macrumors 65816

    Nov 9, 2010
    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.
  3. albacor thread starter macrumors newbie


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

    You're the man! Thanks! :)
  4. dyn macrumors 68030

    Aug 8, 2009
    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.

Share This Page