Selinux and Apache

Daniel J Walsh dwalsh at redhat.com
Thu Dec 11 14:28:11 UTC 2008


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

Bruno Wolff III wrote:
> On Thu, Dec 11, 2008 at 10:29:38 +0900,
>   John Summerfield <debian at herakles.homelinux.org> wrote:
>> It's not hard to serve content from alternative locations, it took me  
>> about five minutes, when I needed to serve from /var/local/mirror, to  
>> find how to do it, without asking. There are not many possible 
>> commands:-)
> 
> It is, however, easy to do it imcorrectly. You normally don't want
> to use chcon. You want to use semanage fcontext to define patterns
> of files and directories to get alternate labels and then use
> restorecon to change them. If you just use chcon the file labels might
> get changed back to their previous values unexpectedly.
> 
Yes chcon changes the file label on disk.

semanage fcontext

changes the system defaults

restorecon reads the system defaults and sets the files labels to match.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAklBI3sACgkQrlYvE4MpobMLtwCffOJgnFOaDKZT5FjOagyfpEGf
R8wAniFb2XpO6aolSgqWhV/J2i3he6nS
=SQrD
-----END PGP SIGNATURE-----




More information about the fedora-test-list mailing list