--===============0721326240972388094== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="phCU5ROyZO6kBE05" Content-Disposition: inline --phCU5ROyZO6kBE05 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Jonathan Aquilina a =C3=A9crit : > Hi guys i have a question regarding SEL. >=20 > I have a VM that is on centos 7 and before I had an issue with wordpre= ss > where it was in read only mode and i ran >=20 > chcon -R unconfined_u:object_r:httpd_sys_rw_content_t:s0 > /var/www/html/wordpress >=20 > =C2=A0 >=20 > to put it in read write mode for me to update the site >=20 > =C2=A0 >=20 > I then ran >=20 > =C2=A0 >=20 > restorecon -rv /var/www/html to restore things to the way they are. >=20 > =C2=A0 >=20 > since then i have not had to run the commands again to update the site > with any other updates >=20 > =C2=A0 >=20 > 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 --=20 Cl=C3=A9 GPG: AE157E0B29F0BEF2 at keys.openpgp.org =C2=AB Ceux qui peuvent renoncer =C3=A0 la libert=C3=A9 essentielle pour ob= tenir un peu de s=C3=A9curit=C3=A9 temporaire, ne m=C3=A9ritent ni la libert=C3=A9 n= i la s=C3=A9curit=C3=A9. =C2=BB -- Memoirs of the life and writings of Benjamin Franklin (1818) CA Cert: https://dl.casperlefantom.net/pub/ssl/root.der --phCU5ROyZO6kBE05 Content-Type: application/pgp-signature; name="signature.asc" -----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----- --phCU5ROyZO6kBE05-- --===============0721326240972388094== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18Kc2VsaW51eCBt YWlsaW5nIGxpc3QgLS0gc2VsaW51eEBsaXN0cy5mZWRvcmFwcm9qZWN0Lm9yZwpUbyB1bnN1YnNj cmliZSBzZW5kIGFuIGVtYWlsIHRvIHNlbGludXgtbGVhdmVAbGlzdHMuZmVkb3JhcHJvamVjdC5v cmcKRmVkb3JhIENvZGUgb2YgQ29uZHVjdDogaHR0cHM6Ly9kb2NzLmZlZG9yYXByb2plY3Qub3Jn L2VuLVVTL3Byb2plY3QvY29kZS1vZi1jb25kdWN0LwpMaXN0IEd1aWRlbGluZXM6IGh0dHBzOi8v ZmVkb3JhcHJvamVjdC5vcmcvd2lraS9NYWlsaW5nX2xpc3RfZ3VpZGVsaW5lcwpMaXN0IEFyY2hp dmVzOiBodHRwczovL2xpc3RzLmZlZG9yYXByb2plY3Qub3JnL2FyY2hpdmVzL2xpc3Qvc2VsaW51 eEBsaXN0cy5mZWRvcmFwcm9qZWN0Lm9yZwo= --===============0721326240972388094==--