变更记录

序号 录入时间 录入人 备注
1 2017-10-24 Alfred Jiang -

方案名称

Mac 系统 - 为用户添加系统目录读写操作权限

关键字

Mac 系统 \ MAC OS \ 权限

需求场景

  1. 需要对指定用户授权系统目录读写操作权限时
  2. 通过 sudo 命令仍然提示部分系统目录权限失败时

参考链接

  1. StackExchange - How do I use chmod on a Mac to make new files inherit parent directory permissions?(推荐)

详细内容

如果出现使用 sudo 命令后依然出现部分系统目录权限错误问题,可以尝试下面的命令

yourusername : 此处改为你的用户名

/path/to/folder : 此处改为权限失败根目录

1
$ chmod +a "user:yourusername allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directory_inherit" /path/to/folder

效果图

(无)

备注