Bug 869110 - SELinux is preventing /usr/bin/mv from 'remove_name' accesses on the directory pk5335.tmp.
SELinux is preventing /usr/bin/mv from 'remove_name' accesses on the director...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-10-23 00:39 EDT by Pratyush Sahay
Modified: 2012-12-16 10:13 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-12-16 10:13:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
File: type (9 bytes, text/plain)
2012-10-23 00:40 EDT, Pratyush Sahay
no flags Details
File: hashmarkername (14 bytes, text/plain)
2012-10-23 00:40 EDT, Pratyush Sahay
no flags Details
output of restorecon (33.42 KB, text/plain)
2012-10-24 04:32 EDT, Pratyush Sahay
no flags Details

  None (edit)
Description Pratyush Sahay 2012-10-23 00:39:59 EDT
Additional info:
libreport version: 2.0.14
kernel:         3.6.2-4.fc17.x86_64

:SELinux is preventing /usr/bin/mv from 'remove_name' accesses on the directory pk5335.tmp.
:*****  Plugin catchall (100. confidence) suggests  ***************************
:If you believe that mv should be allowed remove_name access on the pk5335.tmp directory by default.
:Then you should report this as a bug.
:You can generate a local policy module to allow this access.
:allow this access for now by executing:
:# grep mv /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:Additional Information:
:Source Context                unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023
:Target Context                unconfined_u:object_r:user_home_t:s0
:Target Objects                pk5335.tmp [ dir ]
:Source                        mv
:Source Path                   /usr/bin/mv
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           coreutils-8.15-7.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-156.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Permissive
:Host Name                     (removed)
:Platform                      Linux (removed) 3.6.2-4.fc17.x86_64 #1 SMP Wed Oct
:                              17 02:43:21 UTC 2012 x86_64 x86_64
:Alert Count                   2
:First Seen                    2012-10-23 10:06:48 IST
:Last Seen                     2012-10-23 10:06:51 IST
:Local ID                      122a7ee5-8109-412b-acf3-bdcc75b8adb6
:Raw Audit Messages
:type=AVC msg=audit(1350967011.192:83): avc:  denied  { remove_name } for  pid=5422 comm="mv" name="pk5335.tmp" dev="sda3" ino=179924 scontext=unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=dir
:type=SYSCALL msg=audit(1350967011.192:83): arch=x86_64 syscall=rename success=yes exit=0 a0=7fff95bac7f6 a1=7fff95bac801 a2=3d a3=2 items=0 ppid=5362 pid=5422 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=2 comm=mv exe=/usr/bin/mv subj=unconfined_u:unconfined_r:thumb_t:s0-s0:c0.c1023 key=(null)
:Hash: mv,thumb_t,user_home_t,dir,remove_name
:#============= thumb_t ==============
:allow thumb_t user_home_t:dir remove_name;
:audit2allow -R
:#============= thumb_t ==============
:allow thumb_t user_home_t:dir remove_name;
Comment 1 Pratyush Sahay 2012-10-23 00:40:02 EDT
Created attachment 631881 [details]
File: type
Comment 2 Pratyush Sahay 2012-10-23 00:40:05 EDT
Created attachment 631882 [details]
File: hashmarkername
Comment 3 Miroslav Grepl 2012-10-23 08:09:01 EDT
Any idea what is pk5335.tmp? Do you know what you were doing when this happened.
Comment 4 Pratyush Sahay 2012-10-23 09:14:09 EDT
was trying to compile a TeX document. It was giving: couldn't find font file hfbrsl17.pfb. Installed dvipng, dvipdfm, texlive-texmf-afm, texlive-dviutils and tried to compile again repeatedly, when this showed up. Let me know if I can provide any other info too.
Comment 5 Miroslav Grepl 2012-10-23 09:54:10 EDT
If you execute

# restorecon -R -v

what is your output?
Comment 6 Pratyush Sahay 2012-10-23 14:49:09 EDT
Not getting any output in either $ restorecon -R -v (normal user) or # restorecon -R -v (root)
Comment 7 Miroslav Grepl 2012-10-24 03:57:15 EDT
Ah, I apologize, I wanted to write

# restorecon -R -v /home
Comment 8 Pratyush Sahay 2012-10-24 04:32:53 EDT
Created attachment 632621 [details]
output of restorecon

output of # restorecon -R -v /home
Comment 9 Miroslav Grepl 2012-10-24 14:15:02 EDT
Thank you. Just pls execute

# chcon -Rt samba_share_t /home/ipcv11/Public
# chcon -Rt thumb_tmp_t /home/ipcv11/.texlive2007
Comment 10 Daniel Walsh 2012-10-24 15:08:01 EDT
The real question is how did .texlive2007 get labeled as thumb_tmp_t?
Comment 11 Miroslav Grepl 2012-12-16 10:13:13 EST
It looks it has been moved from /tmp directory directly. 

If you change the labeling to

chcon -R -t thumb_home_t /home/ipcv11/.texlive2007

it should also work.

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