linux-SElinux命令详解setsebool命令

上传人:博****1 文档编号:557011067 上传时间:2022-08-08 格式:DOCX 页数:15 大小:20.80KB
返回 下载 相关 举报
linux-SElinux命令详解setsebool命令_第1页
第1页 / 共15页
linux-SElinux命令详解setsebool命令_第2页
第2页 / 共15页
linux-SElinux命令详解setsebool命令_第3页
第3页 / 共15页
linux-SElinux命令详解setsebool命令_第4页
第4页 / 共15页
linux-SElinux命令详解setsebool命令_第5页
第5页 / 共15页
点击查看更多>>
资源描述

《linux-SElinux命令详解setsebool命令》由会员分享,可在线阅读,更多相关《linux-SElinux命令详解setsebool命令(15页珍藏版)》请在金锄头文库上搜索。

1、文档供参考,可复制、编制,期待您的好评与关注! 配置VSFTPD时本地用户无法切换用到命令setsebool -P ftpd_disable_trans=1setsebool命令查询了相关的资料是selinux的相关设置项这是SELinux的设置命令.其实 man 一下setsebool也知道了:NAMEsetsebool set SELinux boolean value在不熟悉SELnux前,把SELinux关掉也可以的。有时间研究下SELinux。 Redhat从FC3开始,就使用了SELinux来增强安全,但是使用起来有时候太繁琐,就想关闭它,但是如果安装服务器的时候开始没有图形界面,

2、还真很难找到地方可以关闭。正确方法如下:修改/etc/selinux/config文件中的SELINUX=” 为 disabled ,然后重启。2009年8。22更新下面是一些 收集来的 设置命令=ftp=/If you want to share files anonymouslychcon -R -t public_content_t /var/ftp/If you want to setup a directory where you can upload fileschcon -t public_content_rw_t /var/ftp/incomingYou must also t

3、urn on the boolean allow_ftpd_anon_writesetsebool -P allow_ftpd_anon_write=1/If you are setting up this machine as a ftpd server and wish to allow users to access their home directororiessetsebool -P ftp_home_dir 1/If you want to run ftpd as a daemonsetsebool -P ftpd_is_daemon 1/You can disable SELi

4、nux protection for the ftpd daemonsetsebool -P ftpd_disable_trans 1=httpd=/If you want a particular domain to write to the public_content_rw_t domainsetsebool -P allow_httpd_anon_write=1orsetsebool -P allow_httpd_sys_anon_write=1/httpd can be setup to allow cgi s to be executedsetsebool -P httpd_ena

5、ble_cgi 1/If you want to allow access to users home directoriessetsebool -P httpd_enable_homedirs 1chcon -R -t httpd_sys_content_t user/public_html/httpd is allowed access to the controling terminalsetsebool -P httpd_tty_comm 1/such that one httpd service can not interfere with anothersetsebool -P h

6、ttpd_unified 0/loadable modules run under the same context as httpdsetsebool -P httpd_builtin_ing 0/httpd s are allowed to connect out to the networksetsebool -P httpd_can_network_connect 1/ You can disable suexec transitionsetsebool -P httpd_suexec_disable_trans 1/You can disable SELinux protection

7、 for the httpd daemon by executingsetsebool -P httpd_disable_trans 1service httpd restart=named=/If you want to have named update the master zone filessetsebool -P named_write_master_zones 1/You can disable SELinux protection for the named daemon by executingsetsebool -P named_disable_trans 1service

8、 named restart=nfs=/If you want to setup this machine to share nfs partitions read onlysetsebool -P nfs_export_all_ro 1/If you want to share files read/writesetsebool -P nfs_export_all_rw 1/If you want to use a remote NFS server for the home directories on this machinesetsebool -P use_nfs_home_dirs

9、1=samba=/If you want to share files other than home directoriechcon -t samba_share_t /directory/If you want to share files with multiple domainssetsebool -P allow_smbd_anon_write=1/If you are setting up this machine as a Samba server and wish to share the home directoriessetsebool -P samba_enable_ho

10、me_dirs 1/If you want to use a remote Samba server for the home directories on this machinesetsebool -P use_samba_home_dirs 1/You can disable SELinux protection for the samba daemon by executingsetsebool -P smbd_disable_trans 1service smb restart=rsync=/If you want to share files using the rsync dae

11、monchcon -t public_content_t /directories/If you want to share files with multiple domainssetsebool -P allow_rsync_anon_write=1/You can disable SELinux protection for the rsync daemon by executingsetsebool -P rsync_disable_trans 1=kerberos=/allow your system to work properly in a Kerberos environmen

12、tsetsebool -P allow_kerberos 1/If you are running Kerberos daemons kadmind or krb5kdcsetsebool -P krb5kdc_disable_trans 1service krb5kdc restartsetsebool -P kadmind_disable_trans 1service kadmind restart=nis=Allow your system to work properly in a NIS environmentsetsebool -P allow_ypbind 1SELinux 入门

13、2011-05-31 黑日白月 Posted in Featured, Security, TutorialsRSS几乎可以肯定每个人都听说过 SELinux (更准确的说,尝试关闭过),甚至某些过往的经验让您对 SELinux 产生了偏见。不过随着日益增长的 0-day 安全漏洞,或许现在是时候去了解下这个在 Linux 内核中已经有8年历史的强制性访问控制系统(MAC)了。SELinux 与强制访问控制系统SELinux 全称 Security Enhanced Linux (安全强化 Linux),是 MAC (Mandatory Access Control,强制访问控制系统)的一个实

14、现,目的在于明确的指明某个进程可以访问哪些资源(文件、网络端口等)。强制访问控制系统的用途在于增强系统抵御 0-Day 攻击(利用尚未公开的漏洞实现的攻击行为)的能力。所以它不是网络防火墙或 ACL 的替代品,在用途上也不重复。举例来说,系统上的 Apache 被发现存在一个漏洞,使得某远程用户可以访问系统上的敏感文件(比如 /etc/passwd 来获得系统已存在用户),而修复该安全漏洞的 Apache 更新补丁尚未释出。此时 SELinux 可以起到弥补该漏洞的缓和方案。因为 /etc/passwd 不具有 Apache 的访问标签,所以 Apache 对于 /etc/passwd 的访问

15、会被 SELinux 阻止。相比其他强制性访问控制系统,SELinux 有如下优势:控制策略是可查询而非程序不可见的。 可以热更改策略而无需重启或者停止服务。 可以从进程初始化、继承和程序执行三个方面通过策略进行控制。 控制范围覆盖文件系统、目录、文件、文件启动描述符、端口、消息接口和网络接口。 那么 SELinux 对于系统性能有什么样的影响呢?根据 Phoronix 在 2009 年使用 Fedora 11 所做的横向比较来看,开启 SELinux 仅在少数情况下导致系统性能约 5% 的降低。 SELinux 是不是会十分影响一般桌面应用及程序开发呢?原先是,因为 SELinux 的策略主要针对服务器环境。但随着 SELinux 8年来的广泛应用,目前 SELinux 策略在一般桌面及程序开发环境下依然可以同时满足安全性及便利性的要求。以刚刚发布的 Fedora 15 为例,笔者在搭建完整的娱乐(包含多款第三方原生 Linux 游戏及 Wine 游戏)及开发环境(Android SDK + Eclipse)过程中,只有 Wine 程序的首次运行时受到 SELinux 默认

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 行业资料 > 国内外标准规范

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号