chcon: Set File Security Context
chcon | |
---|---|
Category | Command Line Program |
Part Of | GNU Core Utilities |
Classification | Tier 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: