SELinux

From Colettapedia
Revision as of 15:51, 23 March 2018 by Colettace (talk | contribs) (Created page with "==General== * <code>ls -Z</code> * <code>semanage fcontext -a -t httpd_sys_content_t "/var/www/lgorders/admin(/.*)?</code> * <code>restorecon -Rv .</code> * When you cp files...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to 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.