Skip to contentSkip to conversation

chcon v. setfilecon

DISCUSSION rich turner 3 participants 3 messages Aug 4, 2005 – Aug 8, 2005 SELinux security module

lore
Share & tools
lore
#0 lore raw

what is the difference between these commands? it seems they both do the same thing.

is setfilecon deprecated and replaced with chcon?

on my fedora core3 system i have the setfilecon command but not the chcon command. on fc4 i have the chcon command.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw
Quoted 9 lines · rich turner

what is the difference between these commands? it seems they both do the same thing.

is setfilecon deprecated and replaced with chcon?

on my fedora core3 system i have the setfilecon command but not the chcon command. on fc4 i have the chcon command.

setfilecon is a test application that we (Red Hat) no longer ships. chcon is the proper tool to use. It exists on FC3, chcon should be part of coreutils.

Quoted 7 lines

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

Signature · 4 lines
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw
In reply to rich turner
Quoted 7 lines · rich turner

what is the difference between these commands? it seems they both do the same thing.

is setfilecon deprecated and replaced with chcon?

on my fedora core3 system i have the setfilecon command but not the chcon command. on fc4 i have the chcon command.

setfilecon was a trivial example utility provided with libselinux to demonstrate usage of its setfilecon() function. chcon is a "real" utility patterned after chown/chmod with a richer interface and set of functionality. chcon is included in coreutils. I don't know why you wouldn't have it in FC3; it should be there. Red Hat stopped installing setfilecon from libselinux as it served no purpose for end users.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.