Bug 1276956 - SELinux is preventing /usr/bin/lua from write access on the directory prosody.
SELinux is preventing /usr/bin/lua from write access on the directory prosody.
Status: CLOSED NEXTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy (Show other bugs)
7.1
All Linux
unspecified Severity urgent
: rc
: ---
Assigned To: Miroslav Grepl
Milos Malik
:
: 1276958 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-01 13:09 EST by Brian J. Murrell
Modified: 2016-03-29 04:06 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-02 02:29:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Brian J. Murrell 2015-11-01 13:09:35 EST
Prosody needs some SELinux love:

SELinux is preventing /usr/bin/lua from write access on the directory prosody.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that lua should be allowed write access on the prosody directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep lua /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


Additional Information:
Source Context                system_u:system_r:prosody_t:s0
Target Context                system_u:object_r:var_log_t:s0
Target Objects                prosody [ dir ]
Source                        lua
Source Path                   /usr/bin/lua
Port                          <Unknown>
Host                          server.interlinx.bc.ca
Source RPM Packages           lua-5.1.4-14.el7.x86_64
Target RPM Packages   
Policy RPM                    selinux-policy-3.13.1-23.el7_1.17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     server.interlinx.bc.ca
Platform                      Linux server.interlinx.bc.ca
                              3.10.0-229.11.1.el7.x86_64 #1 SMP Thu Aug 6
                              01:06:18 UTC 2015 x86_64 x86_64
Alert Count                   21
First Seen                    2015-11-01 08:52:45 EST
Last Seen                     2015-11-01 10:50:14 EST
Local ID                      b9be32c3-dc37-421c-8469-2f98cfb63871

Raw Audit Messages
type=AVC msg=audit(1446393014.71:33617): avc:  denied  { write } for  pid=7471 comm="lua" name="prosody" dev="dm-7" ino=8438 scontext=system_u:system_r:prosody_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=dir


type=SYSCALL msg=audit(1446393014.71:33617): arch=x86_64 syscall=open success=no exit=EACCES a0=1c57bd8 a1=442 a2=1b6 a3=5 items=0 ppid=7470 pid=7471 auid=4294967295 uid=990 gid=988 euid=990 suid=990 fsuid=990 egid=988 sgid=988 fsgid=988 tty=(none) ses=4294967295 comm=lua exe=/usr/bin/lua subj=system_u:system_r:prosody_t:s0 key=(null)

Hash: lua,prosody_t,var_log_t,dir,write

Now I know why I was not getting any logging at all.  ~sigh~
Comment 2 Miroslav Grepl 2015-11-02 02:29:40 EST
It will be a part of RHEL-7.2.
Comment 3 Miroslav Grepl 2015-11-02 02:30:50 EST
*** Bug 1276958 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.