Bug 361161 - can't restorecon
can't restorecon
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-31 21:31 EDT by Bill Nottingham
Modified: 2014-03-16 23:11 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-06 11:42:51 EST
Type: ---
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 Bill Nottingham 2007-10-31 21:31:31 EDT
Description of problem:

Summary
    SELinux is preventing the restorecon from using potentially mislabeled files
    (<Unknown>).

Detailed Description
    SELinux has denied restorecon access to potentially mislabeled file(s)
    (<Unknown>).  This means that SELinux will not allow restorecon to use these
    files.  It is common for users to edit files in their home directory or tmp
    directories and then move (mv) them to system directories.  The problem is
    that the files end up with the wrong file context which confined
    applications are not allowed to access.

Allowing Access
    If you want restorecon to access this files, you need to relabel them using
    restorecon -v <Unknown>.  You might want to relabel the entire directory
    using restorecon -R -v <Unknown>.

Additional Information        

Source Context                system_u:system_r:setfiles_t:s0
Target Context                root:object_r:sysadm_home_t:s0
Target Objects                None [ chr_file ]
Affected RPM Packages         
Policy RPM                    selinux-policy-3.0.8-42.fc8
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   plugins.home_tmp_bad_labels
Host Name                     nostromo.devel.redhat.com
Platform                      Linux nostromo.devel.redhat.com
                              2.6.23.1-35.wl.3.fc8 #1 SMP Mon Oct 29 12:41:10
                              EDT 2007 x86_64 x86_64
Alert Count                   25
First Seen                    Wed 24 Oct 2007 12:02:58 AM EDT
Last Seen                     Wed 31 Oct 2007 09:23:27 PM EDT
Local ID                      de6e7df7-7eaf-4e50-b8e4-360c91b5d132
Line Numbers                  

Raw Audit Messages            

avc: denied { relabelto } for comm=restorecon dev=sda2 name=tty7 pid=6352
scontext=system_u:system_r:setfiles_t:s0 tclass=chr_file
tcontext=root:object_r:sysadm_home_t:s0

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

selinux-policy-targeted-3.0.8-42.fc8
Comment 1 Daniel Walsh 2007-11-05 15:44:23 EST
You have a chr_file in your /root directory and the system will not allow you to
relabel it.  Why do you have a chr_file there?

Comment 2 Bill Nottingham 2007-11-05 19:38:20 EST
IIRC, it came out of a tar file, was investigating something unrelated.
Comment 3 Daniel Walsh 2007-11-06 11:42:51 EST
So remove it and it is done.

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