chcon: Set File Security Context

chcon

CategoryCommand Line Program
Part OfGNU Core Utilities
ClassificationTier 1
Official Documentation chcon

1 Description

The chcon program is used to alter the SELinux security context of a file.

2 Examples

2.1 Change The Security Context of One File

In the example below the chcon program is used to change the security context of a file called virtual-1.conf to the security context apache-con-1.

user-1@vm:~/Documents$ chcon apache-con-1 virtual-1.conf
user-1@vm:~/Documents$ 

This document was last updated: