我将syslog-ng安装在具有SELinux强制执行功能的CentOS 5.7系统上。
我无法通过"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但是同样的服务类型syslogd_exec_t,syslogd可以通过syslog SELinux启动,为什么SELinux不允许syslog-ng启动呢?我认为它们都需要获取“调度程序参数”。
我如何才能使syslog-ng与SELinux类型"syslogd_exec_t“一起工作,因为它们本质上都是为syslog机制工作的。
谢谢你,EM
发布于 2012-07-29 15:45:38
查看/var/log/audit.log,查看SE Linux拒绝了哪些操作(如果有)。
如果SE Linux拒绝访问,则可以使用命令"audit2allow“生成允许这些操作的策略。不要盲目地允许所有的操作,只允许那些看起来相关的操作。
https://stackoverflow.com/questions/11348636
复制相似问题