简体   繁体   English

SELinux能否让普通用户完全控制文件系统或目录?

[英]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.

相关问题 如何 grep 目录并将找到的完整行写入文件 - how can I grep a directory and write the full line found to a file git可以存储或控制目录的用户,组或权限 - Can git store or control directory user, group or permissions glibc 2.14安装错误selinux.c:错误:libaudit.h没有这样的文件或目录 - glibc 2.14 install error selinux.c: error: libaudit.h no such file or directory 如何获取包括子目录在内的所有文件? (mget -R * 不是普通文件/没有这样的文件或目录) - how can I get all files including sub directory? (mget -R * Not a regular file / No such file or directory) Python 授予读/写文件的完全权限 - Python give full permissions to read/write a file 在SELinux中读取文件的扩展属性 - Read the extended attributes for a file in SELinux 完整Linux文件路径的正则表达式 - Regular Expression for full Linux File Path 无法编辑系统目录中的服务文件 - 只读文件系统 - Can't edit a service file in system directory - Read-only file system 使用linux,如何在/ dev目录之外创建一个设备文件,该文件可以授予我打开和读取该文件的权限? - Using linux, how can I create a device file outside of the /dev directory that will give me permission to open and read it? InnoDB:更改 /var/lib/mysql/ 中的权限或禁用 selinux 后,文件操作中的操作系统错误号 13 未修复 - InnoDB: Operating system error number 13 in a file operation not fixed after changing permissions in /var/lib/mysql/ or disabling selinux
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM