注册 登录  
 加关注
查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

Wei Ding blog

 
 
 

日志

 
 

SELinux is preventing /usr/sbin/httpd from write access on the directory /var/www/zjliu-newweb/lab-bbs/cache. For complete SELinux messages. run sealert -l c5ee521a-254e-4f43-8c34-67a5b0d10ea9  

2012-01-04 15:21:13|  分类: linux |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
操作系统:fedora16
通过网页登录phpbb出现如下错误:

SELinux is preventing /usr/sbin/httpd from write access on the directory /var/www/zjliu-newweb/lab-bbs/cache. For complete SELinux messages. run sealert -l c5ee521a-254e-4f43-8c34-67a5b0d10ea9
解决方法:
semanage fcontext -a -t httpd_sys_rw_content_t  /var/www/zjliu-newweb/lab-bbs/cache/
restorecon -v /var/www/zjliu-newweb/lab-bbs/cache
setsebool -P httpd_unified 1

转一篇文章:
SELinux is preventing /usr/sbin/httpd from 'write' accesses on the directory
/var/www/mod_pagespeed/cache.

***** Plugin httpd_write_content (92.2 confidence) suggests ****************

If you want to allow httpd to have write access on the cache directory
Then you need to change the label on '/var/www/mod_pagespeed/cache'
Do
# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/mod_pagespeed/cache'
# restorecon -v '/var/www/mod_pagespeed/cache'

***** Plugin catchall_boolean (7.83 confidence) suggests *******************

If you want to unify HTTPD handling of all content files.
Then you must tell SELinux about this by enabling the 'httpd_unified' boolean.
Do
setsebool -P httpd_unified 1

***** Plugin catchall (1.41 confidence) suggests ***************************

If you believe that httpd should be allowed write access on the cache directory
by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep /usr/sbin/httpd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context unconfined_u:system_r:httpd_t:s0
Target Context system_u:object_r:httpd_sys_content_t:s0
Target Objects /var/www/mod_pagespeed/cache [ dir ]
Source httpd
Source Path /usr/sbin/httpd
Port <Unknown>
Host (removed)
Source RPM Packages httpd-2.2.17-1.fc14
Target RPM Packages mod-pagespeed-beta-0.9.8.1-215
Policy RPM selinux-policy-3.9.7-18.fc14
Selinux Enabled True
Policy Type targeted
Enforcing Mode Enforcing
Host Name (removed)
Platform Linux (removed) 2.6.35.10-74.fc14.i686 #1 SMP Thu
Dec
23 16:17:40 UTC 2010 i686 i686
Alert Count 39
First Seen Tue 28 Dec 2010 10:50:22 PM PST
Last Seen Tue 28 Dec 2010 10:50:25 PM PST
Local ID 49e4329e-1ad9-4ba6-92e4-19ca0f3262aa

Raw Audit Messages
type=AVC msg=audit(1293605425.691:18135): avc: denied { write } for
pid=14233 comm="httpd" name="cache" dev=dm-0 ino=136159
scontext=unconfined_u:system_r:httpd_t:s0
tcontext=system_u:object_r:httpd_sys_content_t:s0 tclass=dir

httpd,httpd_t,httpd_sys_content_t,dir,write
type=SYSCALL msg=audit(1293605425.691:18135): arch=i386 syscall=mkdir
success=no exit=EACCES a0=b5d91c54 a1=1ff a2=ecb1e4 a3=b5d91c54 items=0
ppid=14086 pid=14233 auid=500 uid=48 gid=488 euid=48 suid=48 fsuid=48 egid=488
sgid=488 fsgid=488 tty=(none) ses=14 comm=httpd exe=/usr/sbin/httpd
subj=unconfined_u:system_r:httpd_t:s0 key=(null)
httpd,httpd_t,httpd_sys_content_t,dir,write

#============= httpd_t ==============
#!!!! This avc can be allowed using the boolean 'httpd_unified'

allow httpd_t httpd_sys_content_t:dir write;
  评论这张
 
阅读(841)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018