SELinux的故障排除一例
刚刚采用Puppet部署了dokuwiki,不过配置完成后报错:
- DokuWiki Setup Error
- The datadir ('pages') at /pages is not found, isn't accessible or writable. You should check your config and permission settings. Or maybe you want to run the installer?
尝试关闭了SELinux,之后就正常。可是在测试环境中就没这个问题。系统环境基本一致。
于是查看了下audit.log:
- tail -f /var/log/audit/audit.log | grep -i httpd
- type=AVC msg=audit(1377479847.165:): avc: denied { search } for pid= comm="httpd" name="/" dev=dm- ino= scontext=unconfined_u:system_r:httpd_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=dir
- type=SYSCALL msg=audit(1377479847.165:): arch= syscall= success=no exit=- a0=1ebef68 a1= a2=1323e18 a3=f items= ppid= pid= auid= uid= gid= euid= suid= fsuid= egid= sgid= fsgid= tty=(none) ses= comm="httpd" exe="/usr/sbin/httpd" subj=unconfined_u:system_r:httpd_t:s0 key=(null)
- type=AVC msg=audit(1377479847.166:): avc: denied { search } for pid= comm="httpd" name="/" dev=dm- ino= scontext=unconfined_u:system_r:httpd_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=dir
- type=SYSCALL msg=audit(1377479847.166:): arch= syscall= success=no exit=- a0=1ec5a58 a1= a2=1323e18 a3=f items= ppid= pid= auid= uid= gid= euid= suid= fsuid= egid= sgid= fsgid= tty=(none) ses= comm="httpd" exe="/usr/sbin/httpd" subj=unconfined_u:system_r:httpd_t:s0 key=(null)
- type=AVC msg=audit(1377479847.166:): avc: denied { search } for pid= comm="httpd" name="/" dev=dm- ino= scontext=unconfined_u:system_r:httpd_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=dir
- type=SYSCALL msg=audit(1377479847.166:): arch= syscall= success=no exit=- a0=1eafc54 a1= a2=1323e18 a3=f items= ppid= pid= auid= uid= gid= euid= suid= fsuid= egid= sgid= fsgid= tty=(none) ses= comm="httpd" exe="/usr/sbin/httpd" subj=unconfined_u:system_r:httpd_t:s0 key=(null)
- type=AVC msg=audit(1377479847.166:): avc: denied { search } for pid= comm="httpd" name="/" dev=dm- ino= scontext=unconfined_u:system_r:httpd_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=dir
- type=SYSCALL msg=audit(1377479847.166:): arch= syscall= success=no exit=- a0=1eafcb8 a1= a2=1323e18 a3=f items= ppid= pid= auid= uid= gid= euid= suid= fsuid= egid= sgid= fsgid= tty=(none) ses= comm="httpd" exe="/usr/sbin/httpd" subj=unconfined_u:system_r:httpd_t:s0 key=(null)
- type=AVC msg=audit(1377479847.166:): avc: denied { search } for pid= comm="httpd" name="/" dev=dm- ino= scontext=unconfined_u:system_r:httpd_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=dir
- type=SYSCALL msg=audit(1377479847.166:): arch= syscall= success=no exit=- a0=1eb04e8 a1= a2=1323e18 a3=f items= ppid= pid= auid= uid= gid= euid= suid= fsuid= egid= sgid= fsgid= tty=(none) ses= comm="httpd" exe="/usr/sbin/httpd" subj=unconfined_u:system_r:httpd_t:s0 key=(null)
- type=AVC msg=audit(1377479847.166:): avc: denied { search } for pid= comm="httpd" name="/" dev=dm- ino= scontext=unconfined_u:system_r:httpd_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=dir
- type=SYSCALL msg=audit(1377479847.166:): arch= syscall= success=no exit=- a0=1eb0624 a1= a2=1323e18 a3=f items= ppid= pid= auid= uid= gid= euid= suid= fsuid= egid= sgid= fsgid= tty=(none) ses= comm="httpd" exe="/usr/sbin/httpd" subj=unconfined_u:system_r:httpd_t:s0 key=(null)
HOHO,第一次处理SELinux的故障,看到其中的name、dev以及scontext和tcontext,于是在“/”下找找:
- [root@localhost /]# ll -Z /
- drwxr-xr-x. apache apache system_u:object_r:file_t:s0 wiki
后来发现是因为将wiki的目录建在了“/”下面,并重新挂载了一个分区,重新赋予权限就好了
- [root@localhost /]# chcon -t httpd_t /wiki
对SELinux的了解还是太浅,呵呵。
SELinux的故障排除一例的更多相关文章
- 理解 OpenStack + Ceph (7): Ceph 的基本操作和常见故障排除方法
本系列文章会深入研究 Ceph 以及 Ceph 和 OpenStack 的集成: (1)安装和部署 (2)Ceph RBD 接口和工具 (3)Ceph 物理和逻辑结构 (4)Ceph 的基础数据结构 ...
- 细化如何安装LNMP + Zabbix 监控安装文档以及故障排除
1.LNMP所需安装包: 上传如下软件包到/soft目录中 mysql- (centos6. 64位自带)也可根据版本自行挑选,前提你了解这个版本 pcre-8.36.tar.gz nginx-.ta ...
- 第十篇 Replication:故障排除
本篇文章是SQL Server Replication系列的第十篇,详细内容请参考原文. 复制故障排除是一项艰巨的任务.在任何复制设置中,都涉及到很多移动部件,而可用的工具并不总是很容易识别问题.Th ...
- ORA-4031 错误故障排除与诊断[视频] (Doc ID 2016002.1)
Copyright (c) 2019, Oracle. All rights reserved. Oracle Confidential. ORA-4031 错误故障排除与诊断[视频] (Do ...
- 【译】第十篇 Replication:故障排除
本篇文章是SQL Server Replication系列的第十篇,详细内容请参考原文. 复制故障排除是一项艰巨的任务.在任何复制设置中,都涉及到很多移动部件,而可用的工具并不总是很容易识别问题.Th ...
- centos6启动故障排除
centos6中boot文件被全部删除的故障排除 /boot文件里关于启动的核心文件有三个,/vmlinuz-2.6.32-696.e16.x86_64,initramfs-2.6.32-696.el ...
- Apache服务器故障排除攻略
Apache服务器故障排除攻略 应用服务器Apache浏览器配置管理网络应用 随着网络技术的普及.应用和Web技术的不断完善,Web服务已经成为互联网上重要的服务形式之一.原有的客户端/服务器模式正 ...
- Longhorn 云原生容器分布式存储 - 故障排除指南
内容来源于官方 Longhorn 1.1.2 英文技术手册. 系列 Longhorn 是什么? Longhorn 云原生容器分布式存储 - 设计架构和概念 Longhorn 云原生容器分布式存储 - ...
- Sentry 监控 - 私有 Docker Compose 部署与故障排除详解
内容整理自官方开发文档 系列 1 分钟快速使用 Docker 上手最新版 Sentry-CLI - 创建版本 快速使用 Docker 上手 Sentry-CLI - 30 秒上手 Source Map ...
随机推荐
- Jquery异步请求简单实例(转)
本文引用自Xingsoft. 一.Jquery向aspx页面请求数据 前台页面JS代码: $("#Button1").bind("click&qu ...
- Xcode和github入门详细教程
Xcode和github详细教程! 主要是参考了现在网上的一些资料给没整过的人一个详细的指南. (1)先在github上注册账号,自行解决! (2)在导航栏右上角new一个repository(仓库) ...
- 在scrollView中使用pageControl
在scrollView中使用pageControl 要这样才能效果好,合理而且人性化 -(void)scrollViewDidScroll:(UIScrollView *)scrollView{ if ...
- bnuoj 20832 Calculating Yuan Fen(暴力模拟)
http://www.bnuoj.com/bnuoj/problem_show.php?pid=20832 [题意]: 给你一串字符串,求一个ST(0<ST<=10000),对字符串中字符 ...
- MongoDB的C#驱动基本使用
转载:http://www.cnblogs.com/wilber2013/p/4175825.html MongoDB的官方C#驱动可以通过 这个链接 得到.链接提供了.msi和.zip两种方式获取驱 ...
- Spring 注解 @Resource和@Autowired(转)
鸣谢:http://my.oschina.net/u/216467/blog/205951 @Resource和@Autowired两者都是做bean的注入使用. 其实@Resource并不是Spri ...
- [转载]获取当前日期和农历的js代码
原文地址: http://www.cnblogs.com/Gnepner/archive/2011/09/07/2169822.html 获取当前日期时间: function GetCurrentDa ...
- 软件调试之INT 3讲解
第4章断点和单步执行 断点和单步执行是两个经常使用的调试功能,也是调试器的核心功能.本章我们将介绍IA-32 CPU是如何支持断点和单步执行功能的.前两节将分别介绍软件断点和硬件断点,第4.3节介绍用 ...
- profile工具
gprof callgrind vtune(待使用) ----time命令(待学习) ps -u <username> -H -opid,cmd strace
- python学习笔记七--数据操作符
一.Python表达式操作符及程序: