Bug 756065 - SELinux is preventing /bin/systemd-tmpfiles from read access on the directory shared-folder.
Summary: SELinux is preventing /bin/systemd-tmpfiles from read access on the directory...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-22 16:06 UTC by Slawomir Czarko
Modified: 2011-11-24 08:32 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-23 18:11:07 UTC
Type: ---


Attachments (Terms of Use)

Description Slawomir Czarko 2011-11-22 16:06:09 UTC
Full path to the directory is /tmp/shared-folder

The context shown for the directory is:
unconfined_u:object_r:etc_runtime_t:s0

SELinux policy version is:
selinux-policy-3.9.16-44.fc15.noarch


SELinux is preventing /bin/systemd-tmpfiles from read access on the directory shared-folder.

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

If you believe that systemd-tmpfiles should be allowed read access on the shared-folder 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 systemd-tmpfile /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_tmpfiles_t:s0
Target Context                unconfined_u:object_r:etc_runtime_t:s0
Target Objects                shared-folder [ dir ]
Source                        systemd-tmpfile
Source Path                   /bin/systemd-tmpfiles
Port                          <Unknown>
Host                          sugi
Source RPM Packages           systemd-units-26-13.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-44.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     sugi
Platform                      Linux sugi 2.6.40.6-0.fc15.i686.PAE #1 SMP Tue Oct
                              4 00:44:38 UTC 2011 i686 i686
Alert Count                   1
First Seen                    Tue Nov 22 16:43:47 2011
Last Seen                     Tue Nov 22 16:43:47 2011
Local ID                      b82fe273-7753-4188-8369-f770bcb7899d

Raw Audit Messages
type=AVC msg=audit(1321976627.499:13759): avc:  denied  { read } for  pid=16914 comm="systemd-tmpfile" name="shared-folder" dev=dm-9 ino=8302 scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=unconfined_u:object_r:etc_runtime_t:s0 tclass=dir


type=SYSCALL msg=audit(1321976627.499:13759): arch=i386 syscall=openat success=yes exit=EIO a0=4 a1=84d14d3 a2=b8800 a3=0 items=0 ppid=1 pid=16914 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-tmpfile exe=/bin/systemd-tmpfiles subj=system_u:system_r:systemd_tmpfiles_t:s0 key=(null)

Hash: systemd-tmpfile,systemd_tmpfiles_t,etc_runtime_t,dir,read

audit2allow

#============= systemd_tmpfiles_t ==============
allow systemd_tmpfiles_t etc_runtime_t:dir read;

audit2allow -R

#============= systemd_tmpfiles_t ==============
allow systemd_tmpfiles_t etc_runtime_t:dir read;

Comment 1 Miroslav Grepl 2011-11-23 12:36:11 UTC
For what is this directory used? 

The /tmp directory is not good location for this.

Comment 2 Slawomir Czarko 2011-11-23 13:58:38 UTC
I have some upstart scripts there. They're not used on this system but I was editing them there before copying them to another system. /home would be better than /tmp for that?

Comment 3 Daniel Walsh 2011-11-23 18:11:07 UTC
chcon -t tmp_t -R /tmp/shared-folder

Should solve the problem.  Does this directory get created at boot time or did you just mv a directory to /tmp?  

If you are no longer using the directory, remove it

Comment 4 Slawomir Czarko 2011-11-24 08:32:03 UTC
(In reply to comment #3)
> chcon -t tmp_t -R /tmp/shared-folder
> 
> Should solve the problem.  Does this directory get created at boot time or did
> you just mv a directory to /tmp?  
I just copied it.

> 
> If you are no longer using the directory, remove it

thanks


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