Re: selinux versus chcon

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

 



On Mon, 2011-09-19 at 14:49 -0400, Fulko Hew wrote:

> If so... why use chcon versus the semanage/restorecon technique?
> or if my assesement is wrong... can someone point me to a better
> explanation/tutorial?

chcon is almost never the right way to go.  It changes the file on the
FS, but it is likely to get changed back the next time a file is
installed in that location.

semanage fcontext -a will tell the userspace policy what the right label
for the file should be.  restorecon then queries the 'right' label from
the policy and does the same underlying thing chcon does to set that
label.

So semanage+restorecon == will last, chcon == will likely get blown away
and make you angry later.

-Eric

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list


[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux