我怎样才能使一个目录可写,从 OS X 终端?
chmod +w <directory>
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.
chmod +w <directory> or chmod a+w <directory> - Write permission for user, group and others
chmod a+w <directory>
chmod u+w <directory> - Write permission for user
chmod u+w <directory>
chmod g+w <directory> - Write permission for group
chmod g+w <directory>
chmod o+w <directory> - Write permission for others
chmod o+w <directory>
To make the parent directory as well as all other sub-directories writable, just add -R
chmod -R a+w <directory>
this not change all ,just one file
this ok
Execute at Admin privilege using sudo in order to avoid permission denied (Unable to change file mode) error.
sudo
sudo chmod 777 <directory location>