Re: Unable to disable SELinux

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

 



On Fri, 13 Mar 2009, "Paul Cocker" <paul.cocker@xxxxxxxxxxxxx> wrote:
> Running SELinux on a CentOS 5.2 box, Im trying to temporarily disable
> SELinux via one of the following methods:
>
> 1. sudo echo 0 > /selinux/enforce

Redirecting standard output is done by your shell.  So "sudo echo > file" will 
not work unless "echo > file" works.  This is not a SE Linux issue.

"sudo setenforce 0" will work.

> 2. sudo vim /selinux/enforce
>
> The first comes back with
>
> -bash: /selinux/enforce: Permission denied

Note that the error is from "bash".

> The second comes back with
>
> Could not set security context for /home/paulc/enforcz~

Editors such as "vim" are not designed to just write data to a file.  In 
the /root directory of my SE Linux Play Machine I have a file named 
thanks.txt_append_only_dont_edit_with_vi - many people try editing it with vi 
and find that it doesn't work.

Generally don't even try using vi to edit "files" under /proc, /sys, or any 
other filesystem that is used for kernel communications.

-- 
russell@xxxxxxxxxxxx
http://etbe.coker.com.au/          My Main Blog
http://doc.coker.com.au/           My Documents Blog

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux