SELinux

From Colettapedia
Jump to: navigation, search

General

  • ls -Z
  • semanage fcontext -a -t httpd_sys_content_t "/var/www/lgorders/admin(/.*)?
  • restorecon -Rv .
  • When you cp files from one location to another, they keep their original context; if you scp (from another machine?) directly into place, they get the context corresponding to the receiving location. So, every time you copy (cp) new/modified files into /var/www/lgorders you’ll have to run $ sudo restorecon -R /var/www/lgorders to allow httpd to use them.