Skip to content

Instantly share code, notes, and snippets.

@jeff1evesque
Last active October 25, 2017 19:35
Show Gist options
  • Save jeff1evesque/676dd8ae6e034b04ee00eb9a4f97b4ff to your computer and use it in GitHub Desktop.
Save jeff1evesque/676dd8ae6e034b04ee00eb9a4f97b4ff to your computer and use it in GitHub Desktop.
Selinux change context
## immediate changes
chcon -Rv --type=httpd_sys_content_t file-name
## persistent changes
semanage fcontext -a -t httpd_sys_script_exec_t 'docroot(/.*)?'
restorecon -RFv docroot/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment