macos 如何使目录可写?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1070216/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I make directory writable?
提问by samoz
How can I make a directory writable, from the OS X terminal?
如何从 OS X 终端使目录可写?
采纳答案by northpole
回答by Alan Haggai Alavi
chmod +w <directory>
orchmod a+w <directory>
- Write permission for user, group and otherschmod u+w <directory>
- Write permission for userchmod g+w <directory>
- Write permission for groupchmod o+w <directory>
- Write permission for others
chmod +w <directory>
或chmod a+w <directory>
- 用户、组和其他人的写入权限chmod u+w <directory>
- 用户的写权限chmod g+w <directory>
- 组的写入权限chmod o+w <directory>
- 为他人写权限
回答by samoz
chmod +w <directory>
回答by Osei-Bonsu Christian
To make the parent directory as well as all other sub-directories writable, just add -R
要使父目录以及所有其他子目录可写,只需添加 -R
chmod -R a+w <directory>
回答by ze zhang
chmod 777 <directory>
this not change all ,just one file
这不会改变所有,只是一个文件
chmod -R a+w <directory>
this ok
这还好
回答by Tadele Ayelegn
Execute at Admin privilege using sudo
in order to avoid permission denied
(Unable to change file mode) error.
使用管理员权限执行sudo
以避免权限被拒绝(无法更改文件模式)错误。
sudo chmod 777 <directory location>