Monday, April 29, 2024
10
rated 0 times [  10] [ 0]  / answers: 1 / hits: 54782  / 3 Years ago, sun, june 13, 2021, 6:20:26

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.


More From » command-line

 Answers
4

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).


[#30437] Monday, June 14, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
turhizz

Total Points: 82
Total Questions: 106
Total Answers: 96

Location: South Korea
Member since Mon, Dec 6, 2021
2 Years ago
turhizz questions
;