Re: trying to understand SELinux message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 16 November 2009 05:47:43 Paul Allen Newell wrote:
> I am not certain why I would want to
> disable SELinux as it clearly is part of the Fedora package and is
> trying to tell me that something isn't right.

Good thinking. You definitely do not want to disable SELinux. It is there for 
a good reason, even if one doesn't know the details of what that reason is.
 
> Yes, I know I should not start X server or login as root ... 

So why did you do it then? Disabled root GUI is also the default for a reason, 
just as SELinux. They are multiple protective layers that try to secure your 
system from any malicious activity, including your own.

> and that is
> not my normal work habit. But I would expect that I should still be able
> to do such and not have SELinux bark unless there was something wrong.
> It is the "what is wrong" that I am trying to understand and correct.

What is wrong (technically) is you moving files across directories without 
changing their SELinux context appropriately. At least that appears so based 
on the info you provided.

However...

What is wrong (essentially) is precisely logging in as root in a GUI. This is 
disabled by default in Fedora, and SELinux policy assumes you run the default 
configuration. Once you enabled root GUI and started poking around in it, it 
was just a matter of time before SELinux starts yelling at you doing this or 
that wrong. I cannot tell exactly what SELinux is complaining about until you 
provide some setroubleshoot info, but it is definitely because you logged in a 
GUI as root, played around with things and then did something SELinux doesn't 
like. And it will keep happening over and over unless you stop using root GUI.

If you are more familiar with Windows world, this would be like logging in 
with admin privileges, disabling antivirus software and automatic updates, and 
then asking "why does the system keep alerting me that security might be 
compromised?". Well, you compromised it.

So much for understanding.

As for correcting the error, I can advise the following:

1) Find all files that you have been mv-ing as root, and move them back to 
their original location.
2) Stop using root GUI.
3) Learn that mv keeps SELinux labels in contrast to cp which changes them 
appropriately. Understand that this is intentional feature of mv and cp. The 
file and directory labels are displayed by "ll -Z".
4) Whenever you need root access use "su -" to log in as root, or learn to 
configure and use sudo. Use only your normal user account for GUI.
5) For regular system administration you don't even need to use su and sudo, 
because the system should ask you for the root password whenever you start a 
GUI app that needs elevated privileges.
6) If SELinux keeps complaining more, learn how to use setroubleshoot utility 
and post the output here on the list. People will help you correct it all, but 
only after you make sure not to produce any more problems by using root GUI.

HTH.

Best, :-)
Marko

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux