Re: Easy way to remove SELinux permissions?

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

 




Stephen Smalley wrote the following on 09/10/2009 02:57 PM:
On Thu, 2009-09-10 at 07:58 +0200, Sean Carlos wrote:
At one point I performed a new Fedora install and restored my personal
files before disabling SELinux which I don't need.

As a result many files have permissions which include a dot at the end,
e.g.:

-rw-rw-r--.

This causes havoc with many applications, i.e. gedit complains it cannot
make a back-up file.

Q: How can I EASILY remove all SELinux attributes, e.g. perhaps with a
single command?

If SELinux is disabled, then you should be able to do this:
find / -exec setfattr -x security.selinux {} \;

You might want to further qualify the find statement to avoid noise on
filesystems that don't support security contexts, e.g.

find / \( -fstype ext2 -o -fstype ext3 -o -fstype ext4 -o -fstype btrfs \) -exec setfattr -x security.selinux {} \;


This works perfectly - thanks!

--
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]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux