[macos] How can I make directory writable?

How can I make a directory writable, from the OS X terminal?

This question is related to macos terminal

The answer is


chmod 777 <directory>

this not change all ,just one file

chmod -R a+w <directory>

this ok


Execute at Admin privilege using sudo in order to avoid permission denied (Unable to change file mode) error.

sudo chmod 777 <directory location>

  • chmod +w <directory> or chmod a+w <directory> - Write permission for user, group and others

  • chmod u+w <directory> - Write permission for user

  • chmod g+w <directory> - Write permission for group

  • chmod o+w <directory> - Write permission for others


chmod +w <directory>

To make the parent directory as well as all other sub-directories writable, just add -R

chmod -R a+w <directory>