`
xxwinnie
  • 浏览: 110154 次
  • 性别: Icon_minigender_1
  • 来自: 佛山
社区版块
存档分类
最新评论

SELinux

阅读更多
setsebool命令
是selinux的相关设置项

这是SELinux的设置命令.
man setsebool:
NAME
       setsebool – set SELinux boolean value
在不熟悉SELnux前,把SELinux关掉也可以的。有时间研究下SELinux。  
Redhat从FC3开始,就使用了SELinux来增强安全,但是使用起来有时候太繁琐,就想关闭它,但是如果安装服务器的时候开始没有图形界面,还真很难找到地方可以关闭。

正确方法如下:修改/etc/selinux/config文件中的SELINUX=”" 为 disabled ,然后重启。

下面是一些 收集来的 设置命令
===ftp===
//If you want to share files anonymously
chcon -R -t public_content_t /var/ftp
//If you want to setup a directory where you can upload files
chcon -t public_content_rw_t /var/ftp/incoming
You must also turn on the boolean allow_ftpd_anon_write
setsebool -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 directorories
setsebool -P ftp_home_dir 1
//If you want to run ftpd as a daemon
setsebool -P ftpd_is_daemon 1
//You can disable SELinux protection for the ftpd daemon
setsebool -P ftpd_disable_trans 1

===httpd===
//If you want a particular domain to write to the public_content_rw_t domain
setsebool -P allow_httpd_anon_write=1
or
setsebool -P allow_httpd_sys__anon_write=1
//httpd can be setup to allow cgi s to be executed
setsebool -P httpd_enable_cgi 1
//If you want to allow access to users home directories
setsebool -P httpd_enable_homedirs 1
chcon -R -t httpd_sys_content_t ~user/public_html
//httpd is allowed access to the controling terminal
setsebool -P httpd_tty_comm 1
//such that one httpd service can not interfere with another
setsebool -P httpd_unified 0
//loadable modules run under the same context as httpd
setsebool -P httpd_builtin_ing 0
//httpd s are allowed to connect out to the network
setsebool -P httpd_can_network_connect 1
// You can disable suexec transition
setsebool -P httpd_suexec_disable_trans 1
//You can disable SELinux protection for the httpd daemon by executing
setsebool -P httpd_disable_trans 1
service httpd restart

===named===
//If you want to have named update the master zone files
setsebool -P named_write_master_zones 1
//You can disable SELinux protection for the named daemon by executing
setsebool -P named_disable_trans 1
service named restart

===nfs===
//If you want to setup this machine to share nfs partitions read only
setsebool -P nfs_export_all_ro 1
//If you want to share files read/write
setsebool -P nfs_export_all_rw 1
//If you want to use a remote NFS server for the home directories on this machine
setsebool -P use_nfs_home_dirs 1

===samba===
//If you want to share files other than home directorie
chcon -t samba_share_t /directory
//If you want to share files with multiple domains
setsebool -P allow_smbd_anon_write=1
//If you are setting up this machine as a Samba server and wish to share the home directories
setsebool -P samba_enable_home_dirs 1
//If you want to use a remote Samba server for the home directories on this machine
setsebool -P use_samba_home_dirs 1
//You can disable SELinux protection for the samba daemon by executing
setsebool -P smbd_disable_trans 1
service smb restart

===rsync===
//If you want to share files using the rsync daemon
chcon -t public_content_t /directories
//If you want to share files with multiple domains
setsebool -P allow_rsync_anon_write=1
//You can disable SELinux protection for the rsync daemon by executing
setsebool -P rsync_disable_trans 1

===kerberos===
//allow your system to work properly in a Kerberos environment
setsebool -P allow_kerberos 1
//If you are running Kerberos daemons kadmind or krb5kdc
setsebool -P krb5kdc_disable_trans 1
service krb5kdc restart
setsebool -P kadmind_disable_trans 1
service kadmind restart

===nis===
Allow your system to work properly in a NIS environment
setsebool -P allow_ypbind 1
分享到:
评论

相关推荐

    SELinux-by-Example-Using-Security-Enhanced-Linux

    SELinux by example is the first complete, hands-on guide to using SELinux in production environments. Authored by three leading SELinux researchers and developers, it illuminates every facet of ...

    [SELinux] SELinux 系统管理手册 (英文版)

    [Packt Publishing] SELinux 系统管理手册 (英文版) [Packt Publishing] SELinux System Administration (E-Book) ☆ 图书概要:☆ A comprehensive guide to walk you through SELinux access controls ...

    SELinux详解-中文版.pdf

    讲解selinux的作用,生效机制,并详细介绍了如何编写selinux策略模块 中文版

    selinux中文手册和详细解说

    中文selinux手册和selinux详细解说,非常适合入门学习,很受用。

    selinux-example_SELinux_

    linux selinux development

    SELinux详解(带完整中文标签)

    SELinux详解(带完整中文标签),不错的介绍selinux的文档

    操作系统安全:selinux自启动.docx

    selinux自启动 SELinux的工作方式 SELinux的工作方式 SELinux是在进行程序、文件等权限设置一句的一个内核模块。 传统的DAC模式 我们知道在Linux下面的ugo权限模式,即通过rwx权限对用户进行访问控制。这也可以称...

    Lock SELinux forced mode.zip

    Lock SELinux forced mode.zip

    操作系统安全:实验配置selinux策略(实验一).docx

    实验一:selinux策略配置 一、实验目的 掌握Selinux的命令 掌握Selinux复制和移动文件 了解chcon命令的使用 掌握Selinux布尔值的查看修改 了解Selinux应用和禁用 二、实验内容与步骤 Selinux命令 SELinux的模式 1.1 ...

    selinux权限修改.pdf

    SELinux是Google从android 5.0开始,强制引入的一套非常严格的权限管理机制,主要用于增强系统的安全性。 然而,在开发中,我们经常会遇到由于SELinux造成的各种权限不足,即使拥有“万能的root权限”,也不能...

    SELinux4AndroidO

    m4.pdf/configuring-selinux-policy-report.pdf/implementing-selinux-as-linux-security-module-report.pdf/The_SELinux_Notebook-4th_Edition.pdf/SEAndroid-NDSS2013.pdf/abs2014_seforandroid_smalley.pdf/...

    SELinux System - 2nd Edition + SELinux 详解 SEAndroid基础

    SELinux System - 2nd Edition + SELinux 详解 SEAndroid基础

    SELinux详解中文版

    《SELinux详解中文版》对于想要深入了解SELinux的朋友来说绝对是一本好书。这本书本身就是讲解SELinux方面的权威。SELinux代表linux安全方向全新的探索。希望大家喜欢。

    SELinux: NSA's Open Source Security Enhanced Linux By Bill McCarty

    SELinux: NSA's Open Source Security Enhanced Linux By Bill McCarty Publisher: O'Reilly 2004 | 256 Pages | ISBN: 0596007167 | CHM | 1 MB

    SELinux介绍.pdf

    本文档详细介绍了SELinux系统,并且详细讨论了在android平台上应该如何配置SELinux规则 SELinux是一套完整的安全策略,最开始是美国国家安全局和一些公司联合设计为了针对Linux系统的安全隐患而产生的一套系统,它为...

    SELinux.NSAs.Open.Source.Security.Enhanced.Linux.2004

    SELinux(Security-Enhanced Linux) 是美国国家安全局(NAS)对于强制访问控制的实现,是 Linux® 上最杰出的新安全子系统。NSA是在Linux社区的帮助下开发了一种访问控制体系,在这种访问控制体系的限制下,进程...

    container-selinux2.9-4.rar

    centos系统安装docker时常缺此安装包, 下载rpm安装包后执行命令: rpm -i container-selinux-2.9-4.el7.noarch.rpm 即可完成安装,再继续docker其他安装。

    GW_selinux_04.xlsx

    Selinux规则转换工具。Selinux规则转换工具。Selinux规则转换工具。Selinux规则转换工具。Selinux规则转换工具。Selinux规则转换工具。Selinux规则转换工具。Selinux规则转换工具。Selinux规则转换工具。Selinux规则...

Global site tag (gtag.js) - Google Analytics