coreutils
[Top][All Lists]
Advanced

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

Make mv work better with SELinux.


From: Daniel J Walsh
Subject: Make mv work better with SELinux.
Date: Mon, 08 Oct 2012 16:24:04 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120918 Thunderbird/15.0.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

One of if not the most common problem people hit with SELinux is the mv
command, which maintains the file context of the source destination.

mv /home/dwalsh/index.html /var/www/html/

This blows up on everybody and then the users have no idea why.

I was thinking about adding -Z (--restorecon) to mv and having it basically do a
internal restorecon on the destination.

Then we could suggest people who get burnt by this to:

alias mv="mv -Z"

In Fedora 18 we have greatly enhanced matchpathcon, by pre-compiling the
regex, so there should be very little slow down in doing this.

I will work on the patch, if people agree with the idea.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBzNmQACgkQrlYvE4MpobPLZgCgn6ljo61yzh5U70OuYEsPXEjn
awcAn3s4ecnqqGAGT+J/DMO11MGMEfNs
=qA+g
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]