Could somebody explain this command:
chcon -R --reference=/var/www/html/ /var/www/html/install
I have read the explanation given in the book; but, I am unable to understand it clearly. Please use simple terminology while explaining the command.
Could somebody explain this command:
chcon -R --reference=/var/www/html/ /var/www/html/install
I have read the explanation given in the book; but, I am unable to understand it clearly. Please use simple terminology while explaining the command.
You are in this case:
chcon -R --reference=RFILE FILE
where:
chcon
- change file security context; you can check any security context of a file with ls -Z
.
-R
- operate on files and directories recursively.
--reference=RFILE
- use RFILE's security context rather than specifying a CONTEXT value.
So, the above command change recursively the security context of each file from /var/www/html/install
to those from /var/www/html
.
Type info coreutils 'chcon invocation'
in terminal and you will have access to the complete manual.
This manual can helps you to understand everything about Security-Enhanced Linux (SELinux).