Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. grep http audit.log | audit2why
  2.  
  3. type=AVC msg=audit(1574437258.257:369850): avc: denied { getattr } for pid=24989 comm="httpd" path="/var/www/html/repos/updates/repodata/repomd.xml" dev="dm-0" ino=6443689502 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:var_t:s0 tclass=file permissive=0
  4.  
  5. Was caused by:
  6. Missing type enforcement (TE) allow rule.
  7.  
  8. You can use audit2allow to generate a loadable module to allow this access.
  9.  
  10. grep http audit.log | audit2allow
  11.  
  12. #============= httpd_t ==============
  13.  
  14. #!!!! WARNING: 'var_t' is a base type.
  15. #!!!! The file '/var/www/html/repos/base/Packages/389-ds-base-snmp-1.3.9.1-10.el7.x86_64.rpm' is mislabeled on your system.
  16. #!!!! Fix with $ restorecon -R -v /var/www/html/repos/base/Packages/389-ds-base-snmp-1.3.9.1-10.el7.x86_64.rpm
  17. allow httpd_t var_t:file getattr;
  18. [root@nuc-0 audit]# restorecon -R -v /var/www/html/repos/base/Packages/389-ds-base-snmp-1.3.9.1-10.el7.x86_64.rpm
  19. restorecon reset /var/www/html/repos/base/Packages/389-ds-base-snmp-1.3.9.1-10.el7.x86_64.rpm context unconfined_u:object_r:var_t:s0->unconfined_u:object_r:httpd_sys_content_t:s0
  20. [root@nuc-0 audit]# grep http audit.log | audit2allow
  21.  
  22. restorecon -R -v /var/www/html/repos/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement