To change file and folder permissions on macOS in bulk use the find command. In terms of the ideal permissions, the following is what I recommend.

  • Files: Set the permissions to 644.
  • Direcories: Set the permissions to 755.

However, you can decide on your own if you prefer.

With your permission decided, run the following commands with your desired path:

find /your/path/here -type d -exec chmod 755 {} \;
find /your/path/here -type f -exec chmod 644 {} \;

P.S. I recently migrated project files from an external hard drive and needed to change the file permission to the proper levels. I sourced the approach on Stack Overflow.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get Involved & Explore More

an abstract painting with blue and yellow colors

Catch up on what I’ve been writing lately.

Show your gratitude.

Join Dare To Code Email List

Get emails from me on full-stack PHP development by subscribing to the Dare To Code mailing list.