Chinaunix首页 | 论坛 | 博客
  • 博客访问: 340848
  • 博文数量: 79
  • 博客积分: 3053
  • 博客等级: 中校
  • 技术积分: 861
  • 用 户 组: 普通用户
  • 注册时间: 2006-02-27 20:43
文章分类

全部博文(79)

文章存档

2012年(3)

2011年(21)

2010年(15)

2009年(40)

分类:

2009-04-30 11:11:14

转自:http://tonykorn97.itpub.net/post/6414/474458

1,查看安全上下文
ls -Z
ps -Z

2,更改安全上下文
chcon -t tmp_t /etc/hosts
chcon -t public_content_rw_t /var/ftp/incoming


3,恢复系统的默认上下文
restorecon /etc/hosts

4,查看和设置selinux级别
getenforce
setenforce
system-config-selinux

5,selinux帮助工具
安装setroubleshootd
用sealert -b打开这个图形工具

6,selinux策略管理工具
列出文件上下文
semanage fcontext -l | grep ftp


7,setroubleshoot client tool
查看警告id
sealert -l 05d2769e-af58-4fc5-ac09-b32cdfb38222

8,设置SELinux布尔值
setsebool -P ftpd_disable_trans=1
setsebool -P allow_ftpd_anon_write=1

9,get SELinux boolean value(s)
getsebool -a | grep ftp

10,查看程序相关的selinux帮助
[root@station10 vsftpd]# man -k ftp | grep selinux
ftpd_selinux (8) - Security Enhanced Linux Policy for the ftp daemon

[root@station12 /]# man ftpd_selinux

阅读(597) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:orabm测试

给主人留下些什么吧!~~