Forrest logo
back to context overview

chcon

List of commands for chcon:

  • chcon:ai:46ca9 I am trying to set up a local repository file. I installed httpd. I configured the directory ownership to "apache." I set the directory permissions to 755. I am getting the error " Status code: 403 for http://annex-repo-02/repo/epel/x86_64/repodata/repomd.xml (IP: 10.238.27.108)". I have set the folders permissions to 777 and I still get the error. I have run the setsebool command to httpd_can_network_connect to 1, I am still getting the error.
    $ chcon -R -t httpd_sys_content_t /path/to/your/directory
    try on your machine
    explain this command
  • chcon:tldr:13993 chcon: Change only the range/level part of SELinux security context.
    $ chcon -l ${range-level} ${filename}
    try on your machine
    explain this command
  • chcon:tldr:38cf4 chcon: Change only the user part of SELinux security context.
    $ chcon -u ${user} ${filename}
    try on your machine
    explain this command
  • chcon:tldr:50679 chcon: Change only the type part of SELinux security context.
    $ chcon -t ${type} ${filename}
    try on your machine
    explain this command
  • chcon:tldr:520ea chcon: Change only the role part of SELinux security context.
    $ chcon -r ${role} ${filename}
    try on your machine
    explain this command
  • chcon:tldr:b3ffa chcon: View security context of a file.
    $ ls -lZ ${filename}
    try on your machine
    explain this command
  • chcon:tldr:ca67a chcon: Change the full SELinux security context of a file.
    $ chcon ${user}:${role}:${type}:${range-level} ${filename}
    try on your machine
    explain this command
  • chcon:tldr:d1b00 chcon: Change the security context of a target file, using a reference file.
    $ chcon --reference=${reference_file} ${target_file}
    try on your machine
    explain this command
back to context overview