LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 04-06-2009, 10:13 AM   #1
nikhilbe
LQ Newbie
 
Registered: Apr 2009
Posts: 3

Rep: Reputation: 0
Angry SELinux preventing httpd run ps -ef for zabbix processes


Hi,
I have installed zabbix on a RHEL 5.1 SELinux enforced box.

The zabbix dashboard displays if zabbix server is running or not by running command `ps -ef | grep zabbix_server | grep -v grep | wc -l` and so on.

As per the posts for SELinux I did run audit2allow -M local and semodule -i local.pp however the ps command cannot still be executed. The dashboard still shows a big NO in red.

Following are the audit.log entries:

==> audit/audit.log <==
type=AVC msg=audit(1239028794.618:17907766): avc: denied { getattr } for pid=19793 comm="ps" path="/proc/1" dev=proc ino=65538 scontext=user_u:system_r:httpd_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=dir
type=SYSCALL msg=audit(1239028794.618:17907766): arch=40000003 syscall=195 success=no exit=-13 a0=9124214 a1=bfc66c90 a2=429ff4 a3=3 items=0 ppid=19792 pid=19793 auid=0 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) comm="ps" exe="/bin/ps" subj=user_u:system_r:httpd_t:s0 key=(null)
[truncated]

Pl. help sorting out this issue.

-Niks.
 
Old 04-07-2009, 03:29 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Hmm - have you tried turning SELinux off completely and seeing if the problem persists?

I.e. on my FC6 system, in /etc/selinux/config:

Code:
SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted
and then a reboot... then retry what you think is being broken by SELinux.

BTW. I think SELinux is way too overcomplicated and neurotic for general use in most non National Security Agency environments, and it imparts so many hurdles to configuring a working server / system that it is just not worth the effort. I find it difficult enough to get a simple web development (LAMP server) set up already, without SELinux inserting even more hurdles and configuration complexities.
 
Old 04-08-2009, 01:41 AM   #3
nikhilbe
LQ Newbie
 
Registered: Apr 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Well.... I tend to think in the same direction.
After I saw no reply to the post for some time, I tried disabling SELinux protection for httpd service and voila.... zabbix started showing proper status.

Just used system-config-selinux and disabled the SELinux for httpd.

Thanks for the reply.

Regards,
Niks.
 
Old 04-08-2009, 02:29 AM   #4
Crito
Senior Member
 
Registered: Nov 2003
Location: Knoxville, TN
Distribution: Kubuntu 9.04
Posts: 1,168

Rep: Reputation: 53
I think you guys are being too nice. IMHO SELinux goes contrary to the very principals on which *nix was built. That is, each prog doing one thing well but users being free to combine them in new and creative ways the original programmers never envisioned. Or to quote someone more eloquent than I: "UNIX was not designed to stop its users from doing stupid things, as that would also stop them from doing clever things." – Doug Gwyn

It's appropriate for a bastion server in the DMZ but it certainly doesn't belong on a workstation product like Fedora.

Last edited by Crito; 04-08-2009 at 02:31 AM.
 
Old 04-08-2009, 03:52 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Why do you use ps -ef? I think it would be better to use "ps -f -p $(pidof xappix_server)". From the audit, it seems to me that selinux balked at ps looking at process 1, which is init and not the xappix_server process you are interested in.

I will also cut and paste the audit info to a file with a unique meaningful name instead of using "local" each time. I haven't used selinux much, but when I played with Fedora 10 on an old laptop, I needed to repeat the process a few times before I could play flash videos in Firefox. After a week, I didn't have any problems with selinux. It takes some time to settle down, but after a while, I even forgot the commands I needed to use because it had been so long since the last alert.
 
  


Reply

Tags
selinux, zabbix


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Could SELinux be preventing me from installing flash plugin in FF? wet Linux - Newbie 5 11-12-2007 07:15 PM
Preventing processes running concurrently - using ps TomCruise2002 Linux - General 1 03-21-2007 01:10 PM
SELinux preventing cvs login bullet45 Linux - Software 1 01-24-2007 05:00 AM
selinux with vsftpd and httpd swpr Linux - Security 4 06-28-2006 05:49 AM
Preventing root processes... znapper Linux - Security 5 03-18-2004 12:18 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 09:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration