SELinux is preventing access to files with the label, file_t.

Antonio Olivares olivares14031 at yahoo.com
Wed Mar 5 02:12:05 UTC 2008


--- Daniel J Walsh <dwalsh at redhat.com> wrote:


=== message truncated ===
Well you will probably need a reboot after you delete
the files.  But
 if
they are in /tmp they should be temporary.

But if you just want to get rid of the file_t files

The following will print the names

# find /tmp -context "*:file_t*"

This command will delete.

# find /tmp -context "*:file_t*" -exec rm {} \; -print

> How do I use tmpfs for /tmp ?
> 
 grep /tmp /etc/fstab
tmpfs         /tmp	tmpfs   defaults        0 0

=== message truncated ===



[root at localhost ~]# cat /etc/fstab 
/dev/VolGroup00/LogVol00 /                       ext3 
  defaults        1 1
LABEL=/boot             /boot                   ext3  
 defaults        1 2
tmpfs                   /dev/shm                tmpfs 
 defaults        0 0
devpts                  /dev/pts                devpts
 gid=5,mode=620  0 0
sysfs                   /sys                    sysfs 
 defaults        0 0
proc                    /proc                   proc  
 defaults        0 0
/dev/sda5               swap                    swap  
 defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap 
  defaults        0 0



[root at localhost ~]# find /tmp/ -content "*:file_t*"
find: invalid predicate `-content'
[root at localhost ~]# find /tmp/ -context "*:file_t*"
/tmp/virtual-olivares.y45zjf
/tmp/virtual-olivares.p28akz
/tmp/virtual-olivares.1dNZIJ
[root at localhost ~]# find /tmp/ -context "*:file_t*"
-exec rm {} \; -print
rm: cannot remove `/tmp/virtual-olivares.y45zjf': Is a
directory
rm: cannot remove `/tmp/virtual-olivares.p28akz': Is a
directory
rm: cannot remove `/tmp/virtual-olivares.1dNZIJ': Is a
directory
[root at localhost ~]# grep /tmp/ /etc/fstab 
[root at localhost ~]# rm -rf /tmp/*
[root at localhost ~]# rm -rf /.??*
[root at localhost ~]# find /tmp/ -context "*:file_t*"
-exec rm {} \; -print

Done!

Hope the file does not come back :)

Thanks for helping out with file_t.

Regards,

Antonio 


      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs




More information about the fedora-test-list mailing list