1

我正在尝试在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)

我一直在网上查找,在任何地方都找不到此错误,也找不到任何修复它的方法。我已尝试将文件夹的权限更改为777apache:apache均无效。

我想出让 redmine工作的唯一解决方案是将SELinux设置为禁用或允许(我不想这样做)。

有没有人有另一种方法来解决这个问题,使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.

有什么建议么?

4

2 回答 2

5

因此,您可以使用 audit2allow (yum install audit-libs-python audit-libs) 来解决这个问题。

SELinux 记录到 /var/log/audit/audit.log。如果您跟踪并捕获重新启动 Web 服务(服务 httpd 重新启动)的输出,则可以通过 audit2allow 运行新输出并制作一个模块以在 selinux 下安装...

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

cat audit_tmp | audit2allow -D -M passenger

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

semodule -i passenger.pp

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

于 2013-12-12T13:36:08.510 回答
1

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

于 2013-10-16T12:24:30.727 回答