【问题标题】:why syslog-ng cannot startup with SELinux TYPE syslogd_exec_t?为什么 syslog-ng 无法使用 SELinux TYPE syslogd_exec_t 启动?
【发布时间】:2012-07-05 16:29:34
【问题描述】:

我在 CentOS 5.7 系统上安装了 syslog-ng,并执行 SELinux。

我无法通过“service syslog-ng start”启动syslog-ng服务,因为错误:

[root@localhost ~]# service syslog-ng start
Starting syslog-ng: 
GThread-ERROR **: file gthread-posix.c: line 135 (): error 'Operation not permitted' during 'pthread_getschedparam (pthread_self(), &policy, &sched)'
aborting...
                                                           [FAILED]

我通过谷歌检查并得到如下:

This is probably related to your SELinux policy, which does not allow syslog-ng  get the scheduler parameters. 

我可以通过

看到 SELinux 类型
[root@localhost ~]# ls -lZ /sbin/syslog*
-rwxr-xr-x  root root system_u:object_r:syslogd_exec_t /sbin/syslogd
-rwxr-xr-x  root root system_u:object_r:syslogd_exec_t /sbin/syslog-ng

但是同一个SELinux类型“syslogd_exec_t”,syslogd可以通过“service syslog start”启动,为什么SELinux不允许syslog-ng启动?我认为他们都需要获得“调度程序参数”。

我怎样才能让 syslog-ng 与 SELinux 类型“syslogd_exec_t”一起工作,因为它们自然都适用于 syslog 机制。

谢谢, EM

【问题讨论】:

    标签: linux syslog selinux syslog-ng


    【解决方案1】:

    查看 /var/log/audit/audit.log 以了解 SE Linux 拒绝了哪些操作(如果有)。

    如果 SE Linux 拒绝访问,则可以使用命令“audit2allow”生成允许这些操作的策略。不要盲目地允许所有操作,只允许那些看起来相关的操作。

    【讨论】:

      猜你喜欢
      • 2020-04-15
      • 2017-02-15
      • 1970-01-01
      • 1970-01-01
      • 2015-02-10
      • 2013-11-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多