我希望为特定用户提供对特定文件夹的权限,在Linux中具有不同级别的权限(读、写、执行)。并对一些群体做同样的事情。
例如,我想要授予user:sigmundlucas对promotional_material的权限(读、写
另一个示例是,我想为组赋予development_project_data_directory的testers权限(execute
我需要从根帐户执行所有这些操作,因为有问题的文件夹在登录到用户时不允许使用chmod
我需要添加多个组/用户需要访问某些文件
发布于 2021-05-07 23:51:09
这通常是通过chown和groups来完成的!
为您的用户创建一些要成为其成员的组
然后将目录chown to be :<group>
例如
groupadd mygroup # create a new group
usermod -aG mygroup myuser # add the group to the user's info
chown :mygroup target_directory # set the group to own the directory
chmod 770 target_directory # root and the group can enter/read/write如果你不习惯这些数字,你可以用https://chmod-calculator.com/这样的网站来计算chmod
抓取
的所有中间路径
https://stackoverflow.com/questions/67438015
复制相似问题