How can I make directory writable?

MacosTerminal

Macos Problem Overview


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

Macos Solutions


Solution 1 - Macos

  • 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

Solution 2 - Macos

chmod +w <directory>

Solution 3 - Macos

chmod 777 <directory>

This will give you execute/read/write privileges. You can play with the numbers to finely tune your desired permissions.

Here is the wiki with great examples.

Solution 4 - Macos

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

chmod -R a+w <directory>

Solution 5 - Macos

chmod 777 <directory>

this not change all ,just one file

chmod -R a+w <directory>

this ok

Solution 6 - Macos

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

sudo chmod 777 <directory location>

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionGoyoView Question on Stackoverflow
Solution 1 - MacosAlan Haggai AlaviView Answer on Stackoverflow
Solution 2 - MacossamozView Answer on Stackoverflow
Solution 3 - MacosnorthpoleView Answer on Stackoverflow
Solution 4 - MacosOsei-Bonsu ChristianView Answer on Stackoverflow
Solution 5 - Macosze zhangView Answer on Stackoverflow
Solution 6 - MacosTadele AyelegnView Answer on Stackoverflow