Hide Forgot
Description of problem: SELinux is preventing /usr/sbin/setfiles from 'associate' accesses on the filesystem /sys. ***** Plugin filesystem_associate (99.5 confidence) suggests ************** If you believe setfiles should be allowed to create sys files Then you need to use a different command. You are not allowed to preserve the SELinux context on the target file system. Do use a command like "cp -p" to preserve all permissions except SELinux context. ***** Plugin catchall (1.49 confidence) suggests ************************** If you believe that setfiles should be allowed associate access on the sys filesystem 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 restorecon /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context system_u:object_r:mock_var_lib_t:s0 Target Context system_u:object_r:sysfs_t:s0 Target Objects /sys [ filesystem ] Source restorecon Source Path /usr/sbin/setfiles Port <Unknown> Host (removed) Source RPM Packages policycoreutils-2.2.2-2.fc20.x86_64 policycoreutils-2.2.2-3.fc20.x86_64 Target RPM Packages filesystem-3.2-19.fc20.x86_64 Policy RPM selinux-policy-3.12.1-90.fc20.noarch selinux- policy-3.12.1-106.fc20.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 3.11.10-300.fc20.x86_64 #1 SMP Fri Nov 29 19:16:48 UTC 2013 x86_64 x86_64 Alert Count 1 First Seen 2013-12-06 00:04:09 MSK Last Seen 2013-12-06 00:04:09 MSK Local ID 7074e56c-999f-4aa2-89c7-e74d45b7fd4f Raw Audit Messages type=AVC msg=audit(1386273849.480:607): avc: denied { associate } for pid=9907 comm="restorecon" name="/" dev="sysfs" ino=1 scontext=system_u:object_r:mock_var_lib_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=filesystem type=SYSCALL msg=audit(1386273849.480:607): arch=x86_64 syscall=lsetxattr success=no exit=EACCES a0=7f9e63c67c50 a1=7f9e62c37d3e a2=7f9e63c68de0 a3=24 items=0 ppid=8460 pid=9907 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=1 tty=pts1 comm=restorecon exe=/usr/sbin/setfiles subj=unconfined_u:system_r:setfiles_t:s0-s0:c0.c1023 key=(null) Hash: restorecon,mock_var_lib_t,sysfs_t,filesystem,associate Additional info: reporter: libreport-2.1.9 hashmarkername: setroubleshoot kernel: 3.11.10-300.fc20.x86_64 type: libreport Potential duplicate: bug 665304
DId you run a restorecon on /var/lib while a mock session was running?
(In reply to Daniel Walsh from comment #1) > DId you run a restorecon on /var/lib while a mock session was running? almost. I have started update my system while did mock build. was updating selinux
Well SELinux blocked this correclty, but really restorecon should not have tried.
*** Bug 1038790 has been marked as a duplicate of this bug. ***