Bug 1461044 - [SELINUX-RHEL6]statedump is not able to dump the file in /var/run/gluster because of SELinux permissions
[SELINUX-RHEL6]statedump is not able to dump the file in /var/run/gluster bec...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: samba (Show other bugs)
3.3
Unspecified Unspecified
unspecified Severity unspecified
: ---
: RHGS 3.3.0
Assigned To: Michael Adam
Vivek Das
rhel-fix
:
Depends On: 1462824
Blocks: 1417151
  Show dependency treegraph
 
Reported: 2017-06-13 08:21 EDT by Vivek Das
Modified: 2017-09-25 07:22 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1461064 (view as bug list)
Environment:
Last Closed: 2017-09-25 07:22:43 EDT
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 Vivek Das 2017-06-13 08:21:28 EDT
Description of problem:

On a samba setup , if the statedump command is executed to collect the statedump on gfapi side , the file is not getting dumped to the location /var/run/gluster for RHEL6.

After setting the SELinux to permissive , it was able to dump.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Create a samba ctdb setup 
2. mount a volume, run some I/O's
3. Run statedump command as following and check for the file:

gluster volume statedump testvol client localhost:<smbd_pid>

Actual results:
The file is not getting dumped in default location due to SELINUX preventing smbd to access and write to /var/run/gluster.

Expected results:
statedump should get dumped in /var/run/gluster

Additional info:

type=AVC msg=audit(1497356412.330:397441): avc:  denied  { search } for  pid=29363 comm="smbd" name="gluster" dev=dm-0 ino=1178243 scontext=unconfined_u:system_r:smbd_t:s0 tcontext=system_u:object_r:glusterd_var_run_t:s0 tclass=dir
type=SYSCALL msg=audit(1497356412.330:397441): arch=c000003e syscall=2 success=no exit=-13 a0=7faca64bc170 a1=0 a2=1b6 a3=0 items=0 ppid=24626 pid=29363 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=50810 comm="smbd" exe="/usr/sbin/smbd" subj=unconfined_u:system_r:smbd_t:s0 key=(null)
type=AVC msg=audit(1497356412.331:397442): avc:  denied  { search } for  pid=29363 comm="smbd" name="gluster" dev=dm-0 ino=1178243 scontext=unconfined_u:system_r:smbd_t:s0 tcontext=system_u:object_r:glusterd_var_run_t:s0 tclass=dir
type=SYSCALL msg=audit(1497356412.331:397442): arch=c000003e syscall=2 success=no exit=-13 a0=7faca64bc170 a1=0 a2=1b6 a3=0 items=0 ppid=24626 pid=29363 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=50810 comm="smbd" exe="/usr/sbin/smbd" subj=unconfined_u:system_r:smbd_t:s0 key=(null)
type=AVC msg=audit(1497356412.331:397443): avc:  denied  { search } for  pid=29363 comm="smbd" name="gluster" dev=dm-0 ino=1178243 scontext=unconfined_u:system_r:smbd_t:s0 tcontext=system_u:object_r:glusterd_var_run_t:s0 tclass=dir
type=SYSCALL msg=audit(1497356412.331:397443): arch=c000003e syscall=2 success=no exit=-13 a0=7faca64be170 a1=c2 a2=180 a3=0 items=0 ppid=24626 pid=29363 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=50810 comm="smbd" exe="/usr/sbin/smbd" subj=unconfined_u:system_r:smbd_t:s0 key=(null)
type=AVC msg=audit(1497356412.331:397444): avc:  denied  { search } for  pid=29363 comm="smbd" name="gluster" dev=dm-0 ino=1178243 scontext=unconfined_u:system_r:smbd_t:s0 tcontext=system_u:object_r:glusterd_var_run_t:s0 tclass=dir
Comment 2 Vivek Das 2017-06-13 08:38:40 EDT
Version
-------
samba-4.6.3-2.el6rhs.x86_64
glusterfs-server-3.8.4-27.el6rhs.x86_64

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