Re: Question
Casper <[email protected]>
| Newsgroups | gmane.linux.redhat.fedora.selinux |
|---|---|
| Organization | Casper Corp. |
| Message-ID | <[email protected]> |
Jonathan Aquilina a écrit : > Hi guys i have a question regarding SEL. > > I have a VM that is on centos 7 and before I had an issue with wordpress > where it was in read only mode and i ran > > chcon -R unconfined_u:object_r:httpd_sys_rw_content_t:s0 > /var/www/html/wordpress > > > > to put it in read write mode for me to update the site > > > > I then ran > > > > restorecon -rv /var/www/html to restore things to the way they are. > > > > since then i have not had to run the commands again to update the site > with any other updates > > > > what exactly is happening Hi Jonathan, when you run the 'chcon', you're changing the contexte of the directory and its subdirectories As you noticed, it works fine But, when you run the 'restorecon', the command read what contexte to apply for each file and directory in a policy file If you don't update the policy file with what you want (httpd_sys_rw_content_t on /var/www/html/wordpress and its subdirectories), then restorecon will reset the contexte accordingly to its policy file See 'semanage fcontext' for editing the policy file (man semanage) Then, restorecon will do what you want :) Regards, Casper -- Clé GPG: AE157E0B29F0BEF2 at keys.openpgp.org « Ceux qui peuvent renoncer à la liberté essentielle pour obtenir un peu de sécurité temporaire, ne méritent ni la liberté ni la sécurité. » -- Memoirs of the life and writings of Benjamin Franklin (1818) CA Cert: https://dl.casperlefantom.net/pub/ssl/root.der _______________________________________________ selinux mailing list -- [email protected] To unsubscribe send an email to [email protected] Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/[email protected]
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEcNWpsYTrRfLHoxirrhV+CynwvvIFAl6Tc8wACgkQrhV+Cynw vvJzCg//QmtkOo38C5GLcGRm/OW4wGHk1ZwI6Z6YhzsitLGOYOOi/MqXWm06movY GwVvYJO7VYOkvi33uzS+f9+VjSTs847fupdiiDGhXa/0EED/hBzQtCQYU0z2a5Hx Ap3YGjQai3weJa+5jgMT/HpEsrCQsCW+M7/I+gYEfM8bcLuNhEuJZ6ssL/eYXzwH Avq/F/salpioMAoxFGwUSDE19h66krKJurps/DvhW8T/iw8E2FtBzDicJv0oj0Ib q/s3D/q6r/T4AdgMb7PvOJos4VuD7pbbyA+iTdMkOvb5lPK+Os1sLKNnjKD/t7TG gdDCAbrPIkMas//fSxnwxE1zJDvvqxrztbuFXGiiNsePjZfUdxpV0HoM49Quqn6f 5uIa0DcgvX2/DkOd/eFbLdeihwvVMKjxZ/cHcvpTnxi9VSa2pZq7CnrgFPhB36qk yHEsu0I5THWB3gWVEMxlA1F3B4CORfyeFI5w0mRSbGTidtVwVfcXMlh8c+KpT39n oJ5tF4mATKTcU1K6g6IBP8kLOoS0SCCpUjFJM4dmrETkSEvmd/z2488wIcAuR5a8 DT7UB6vK7KB9kYsmiK+oIuvjpjeZvLpbg/YhC0YWhG4IDhP+cPOKF0brUZZDKy2W tfOXYrcgPr0yZW/mM0I7cY47w4HOEODXaaEk+HyT69EWcUSXCgc= =GtQC -----END PGP SIGNATURE-----