LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 09-04-2008, 11:41 AM   #1
awmian
LQ Newbie
 
Registered: Aug 2008
Posts: 22

Rep: Reputation: 15
How do I relabel files?


I have Fedora9 installed on my laptop. Today I installed HPlip to enable my printer. The installation went perfect. Even a test page was printed. However, after rebooting the system I am unable to print and get the following Error/Msg:

Quote:
Summary:

SELinux is preventing the python from using potentially mislabeled files (/root/.hplip/hplip.conf).

Detailed Description:

[SELinux is in permissive mode, the operation would have been denied but was permitted due to permissive mode.]

Allowing Access:

If you want python to access this files, you need to relabel them using restorecon -v '/root/.hplip/hplip.conf'. You might want to relabel the entire
directory using restorecon -R -v '/root/.hplip'.
When I tried using the above command, I get the following output:

Code:
[awm@localhost ~]$ restorecon -R -v '/root/.hplip'
bash: restorecon: command not found
[awm@localhost ~]$
Can someone pls help me with this relabeling stuff?
 
Old 09-04-2008, 11:46 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
Start a root shell and try that... of course.

You may need the full path of the command too.
 
Old 09-04-2008, 11:56 AM   #3
awmian
LQ Newbie
 
Registered: Aug 2008
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by amani View Post
Start a root shell and try that... of course.

You may need the full path of the command too.
root shell - you mean i login as root ? I've tried doing this but still getting the same msg:
Code:
[root@localhost ~]# restorecon -R -v '/root/.hplip'
bash: restorecon: command not found
[root@localhost ~]#
I'm sure you'd have notice i'm a real novice at linux so you'll need to guide me a bit in detail.
 
Old 09-04-2008, 08:16 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,372

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
As he said, try the full path to restorecon. Should be /sbin/restorecon (as per my F8)
 
Old 09-05-2008, 02:29 AM   #5
ia64processor
Member
 
Registered: Sep 2003
Location: Tokyo
Distribution: Red Hat
Posts: 41

Rep: Reputation: 15
# touch /.autorelabel

It will relabel all files on next reboot if SELinux is enabled.

Last edited by ia64processor; 09-05-2008 at 02:30 AM.
 
Old 09-08-2008, 11:50 PM   #6
samnjugu
Member
 
Registered: Apr 2006
Location: Atlanta
Distribution: Centos, knoppix, Fedora, Mepis, Zenwalk, Mint
Posts: 142

Rep: Reputation: 16
try using su - instead of just su, when switching to root. As the first one puts you in the root enviroment where this command is available unlike the last one. This is what i have to do on my machine when running restorecon cmd's.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
in copy files or ls files the command want to invert select some files how to?? hocheetiong Linux - Newbie 3 06-27-2008 06:32 AM
Relabel "0 Reply Threads" to "Zero Reply Threads" J.W. LQ Suggestions & Feedback 21 01-16-2007 07:48 PM
converting a doc/ppt Windows files in html files under linux env agrosu Programming 7 02-23-2006 03:07 PM
How program to read files with extension .dat y .cfg files COMTRADE in fedora 1? ivonne Linux - Software 0 11-22-2004 11:42 AM
How to filter files in files and files which are in a sub-directory with "grep"? Piero Linux - Newbie 9 08-29-2003 02:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 05:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration