[英]Can SELinux give a regular user full control of a file system or directory?
We are setting up a Linux machine (CentOS 7 to be exact) to share files within a team. 我们正在建立一台Linux机器(确切地说是CentOS 7)来共享团队中的文件。 One particular regular user (the boss) will need to be able to read / write / modify / delete all files and directories in the file system or directory where we share files.
一个特定的常规用户(老板)需要能够读取/写入/修改/删除我们共享文件的文件系统或目录中的所有文件和目录。 I just wonder if it is possible to set an SELinux policy to enforce his privilege.
我只是想知道是否可以设置SELinux策略来强制执行他的权限。 In the past we ran a cron job to enforce permissions on all files and directories every ten minutes.
在过去,我们运行了一个cron作业,每十分钟对所有文件和目录强制执行权限。 I just thought SELinux will be the better way to go if it is possible.
我认为SELinux将是更好的方式,如果可能的话。
I am also open to any other suggestions. 我也对任何其他建议持开放态度。 Thanks a lot!
非常感谢!
Selinux provides a mechanism for supporting access control security policies. Selinux提供了一种支持访问控制安全策略的机制。 If you need to give access to other users , you can use ACLs or file permissions.
如果需要授予其他用户访问权限,则可以使用ACL或文件权限。
setfacl -Rdm u:boss:rwx /shared_dir setfacl -Rdm u:boss:rwx / shared_dir
setfacl -Rm u:boss:rwx /shared_dir setfacl -Rm u:boss:rwx / shared_dir
to view ACLs :- getfacl filename 查看ACL: - getfacl filename
u:- user 你: - 用户
g:- group g: - 组
d:- default d: - 默认
o:- other o: - 其他
see the man pages for more infor:- man acl 请参阅手册页以获取更多信息: - man acl
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.