Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想授予某个用户对目录(递归)的完整 rwx 权限,包括将来可能创建的任何文件或子目录。我不想让他们成为该目录的所有者。我应该使用什么语法?谢谢 - 黛比
你有两个选择:
a) 用户在拥有目录树的组中
chmod -R g+rwx thedir
b)用户不在拥有目录树的组中
chmod -R o+rwx thedir
因为您希望此树中新创建的文件和目录遵循您需要的相同规则
$ chgrp thegrp thedir $ chmod g+rwxs thedir