Permissions 针对红矿的Phusion乘客,SELinux许可被拒绝

Permissions 针对红矿的Phusion乘客,SELinux许可被拒绝,permissions,centos,passenger,redmine,selinux,Permissions,Centos,Passenger,Redmine,Selinux,我正在尝试在CentOS 6.3上安装Redmine,但我在日志文件中继续出现此错误 Passenger could not be initialized because of this error: Unable to start the Phusion Passenger watchdog (/usr/lib/ruby/gems/1.8/gems/passenger-4.0.20/buildout /agents/PassengerWatchdog): Permission denied

我正在尝试在CentOS 6.3上安装Redmine,但我在日志文件中继续出现此错误

Passenger could not be initialized because of this error: Unable to start 
the Phusion Passenger watchdog (/usr/lib/ruby/gems/1.8/gems/passenger-4.0.20/buildout
 /agents/PassengerWatchdog): Permission denied (errno=13)
我一直在网上查找,但在任何地方都找不到此错误,也找不到任何修复此错误的方法。我已尝试将文件夹的权限更改为
777
apache:apache
,但均无效

我提出的让redmine工作的唯一解决方案是将SELinux设置为disabled或permissive(我不想这样做)

是否有人有其他方法来解决此问题,使SELinux处于启用状态

在/var/log/messages下找到SELinux日志文件

这是文件的结尾

    Oct 16 14:07:30 localhost pulseaudio[2329]: alsa-util.c: Disabling timer-based scheduling because running inside a VM.
    Oct 16 14:07:30 localhost rtkit-daemon[2183]: Sucessfully made thread 2331 of process 2329 (/usr/bin/pulseaudio) owned by '500' RT at priority 5.
    Oct 16 14:07:30 localhost pulseaudio[2329]: alsa-util.c: Disabling timer-based scheduling because running inside a VM.
    Oct 16 14:07:30 localhost rtkit-daemon[2183]: Sucessfully made thread 2332 of process 2329 (/usr/bin/pulseaudio) owned by '500' RT at priority 5.
    Oct 16 14:07:31 localhost rtkit-daemon[2183]: Sucessfully made thread 2427 of process 2427 (/usr/bin/pulseaudio) owned by '500' high priority at nice level -11.
    Oct 16 14:07:31 localhost pulseaudio[2427]: pid.c: Daemon already running.
    Oct 16 14:08:04 localhost kernel: type=1400 audit(1381957684.726:5): avc:  denied  { execute_no_trans } for  pid=2663 comm="httpd" path="/usr/lib/ruby/gems/1.8/gems/passenger-4.0.20/buildout/agents/PassengerWatchdog" dev=dm-0 ino=1048752 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:lib_t:s0 tclass=file
    Oct 16 14:08:04 localhost kernel: type=1400 audit(1381957684.760:6): avc:  denied  { execute_no_trans } for  pid=2668 comm="httpd" path="/usr/lib/ruby/gems/1.8/gems/passenger-4.0.20/buildout/agents/PassengerWatchdog" dev=dm-0 ino=1048752 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:lib_t:s0 tclass=file
    Oct 16 14:09:11 localhost pulseaudio[2329]: alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write!
    Oct 16 14:09:11 localhost pulseaudio[2329]: alsa-sink.c: Most likely this is a bug in the ALSA driver 'snd_intel8x0'. Please report this issue to the ALSA developers.
    Oct 16 14:09:11 localhost pulseaudio[2329]: alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.
Oct 16 14:07:30 localhost pulseaudio[2329]:alsa util.c:禁用基于计时器的调度,因为它在VM内运行。
10月16日14:07:30 localhost rtkit守护程序[2183]:成功创建了优先级为5的“500”RT拥有的进程2329(/usr/bin/pulseaudio)的线程2331。
10月16日14:07:30 localhost pulseaudio[2329]:alsa util.c:禁用基于计时器的调度,因为它在VM内运行。
10月16日14:07:30 localhost rtkit守护程序[2183]:成功创建了优先级为5的“500”RT拥有的进程2329(/usr/bin/pulseaudio)的线程2332。
10月16日14:07:31 localhost rtkit守护程序[2183]:成功创建了进程2427(/usr/bin/pulseaudio)的线程2427,该线程由“500”拥有,具有良好的高优先级,级别为-11。
10月16日14:07:31本地主机pulseaudio[2427]:pid.c:守护进程已在运行。
10月16日14:08:04本地主机内核:type=1400审核(1381957684.726:5):avc:denied{execute_no_trans}for pid=2663 comm=“httpd”path=“/usr/lib/ruby/gems/1.8/gems/passer-4.0.20/buildout/agents/PassengerWatchdog”dev=dm-0 ino=1048752 scontext=unconfined_-ass:system:httpd_t:s0tcxt=unconfined_:object
10月16日14:08:04本地主机内核:type=1400 audit(1381957684.760:6):avc:denied{execute_no_trans}for pid=2668 comm=“httpd”path=“/usr/lib/ruby/gems/1.8/gems/passer-4.0.20/buildout/agents/PassengerWatchdog”dev=dm-0 ino=1048752 scontext=unconfined_-ass:system:httpd_t:s0;:s0tcxt=unconfined_:object
10月16日14:09:11 localhost pulseaudio[2329]:alsa接收器。c:alsa唤醒我们向设备写入新数据,但实际上没有要写入的内容!
10月16日14:09:11本地主机pulseaudio[2329]:alsa接收器。c:这很可能是alsa驱动程序“snd_intel8x0”中的一个错误。请向ALSA开发人员报告此问题。
10月16日14:09:11 localhost pulseaudio[2329]:alsa sink.c:我们被设置了轮询的消息吵醒——但是随后的snd_pcm_avail()返回0或另一个值

有什么建议吗?

看看/var/log/syslog。该文件包含SELinux错误消息,告诉您如何解决任何权限问题。

请查看/var/log/syslog。该文件包含SELinux错误消息,这些消息告诉您如何解决任何权限问题。

因此,您可以使用audit2allow(yum安装audit libs python audit libs)来解决此问题

SELinux将日志记录到/var/log/audit/audit.log。如果您跟踪并捕获重新启动web服务(service httpd restart)的输出,那么您可以通过audit2allow运行新的输出,并在selinux下安装一个模块

因此,假设您已将其捕获到名为“audit_tmp”的文件中:

这将创建一个名为passenger.pp的文件,您可以使用:

semodule -i passenger.pp

这样做将解除阻止乘客装载的第一件事——但请注意,可能会有更多,因此您需要再次重复该过程,直到它起作用。我希望这是有道理的

因此,您可以使用audit2allow(yum安装audit libs python audit libs)修复此问题

SELinux将日志记录到/var/log/audit/audit.log。如果您跟踪并捕获重新启动web服务(service httpd restart)的输出,那么您可以通过audit2allow运行新的输出,并在selinux下安装一个模块

因此,假设您已将其捕获到名为“audit_tmp”的文件中:

这将创建一个名为passenger.pp的文件,您可以使用:

semodule -i passenger.pp

这样做将解除阻止乘客装载的第一件事——但请注意,可能会有更多,因此您需要再次重复该过程,直到它起作用。我希望这是有道理的

/var/log/下没有系统日志。它是否位于其他位置或其他名称下?我一直在/var/log/httpd/error\u log中查找我最初发布的错误/var/log/messages?是的,我编辑了这个问题,因为回答不合适。但是基于该文件,我仍然不知道如何解决这个问题。我看到您的/var/log/messages不包含sealert消息(这有助于解决问题)。试一下这个指南来启用sealert:是的,我只是得到了错误,没有修复它的说明。我通读了那一页,这就是我如何找到日志文件的地方,但我会再看一眼,我想这是我能得到的最好的帮助。感谢您的回答/var/log/下没有系统日志。它可能位于其他地方或其他名称下吗?我一直在/var/log/httpd/error\u log中查找我最初发布的错误/var/log/messages?是的,我编辑了这个问题,因为回答不合适。但是基于该文件,我仍然不知道如何解决这个问题。我看到您的/var/log/messages不包含sealert消息(这有助于解决问题)。试一下这个指南来启用sealert:是的,我只是得到了错误,没有修复它的说明。我通读了那一页,这就是我如何找到日志文件的地方,但我会再看一眼,我想这是我能得到的最好的帮助。感谢您的回答如果您打算这样做,请先执行“setEnforce0”,以便它将审核一次遇到的所有拒绝。此外,盲目启用也是不明智的