Hide Forgot
Description of problem: Using firefox to display an html page on loclahostthat refered to a jpg file in the same directory (this should find that I've reported it as https://bugzilla.redhat.com/show_bug.cgi?id=1388805 SELinux is preventing httpd from 'read' accesses on the file gravel.jpg. ***** Plugin catchall_boolean (89.3 confidence) suggests ****************** If you want to allow httpd to read user content Then you must tell SELinux about this by enabling the 'httpd_read_user_content' boolean. You can read 'None' man page for more details. Do setsebool -P httpd_read_user_content 1 ***** Plugin catchall (11.6 confidence) suggests ************************** If you believe that httpd should be allowed read access on the gravel.jpg file by default. Then you should report this as a bug. You can generate a local policy module to allow this access. Do allow this access for now by executing: # ausearch -c 'httpd' --raw | audit2allow -M my-httpd # semodule -X 300 -i my-httpd.pp Additional Information: Source Context system_u:system_r:httpd_t:s0 Target Context unconfined_u:object_r:home_bin_t:s0 Target Objects gravel.jpg [ file ] Source httpd Source Path httpd Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages Policy RPM <Unknown> Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 4.7.9-200.fc24.x86_64 #1 SMP Thu Oct 20 14:26:16 UTC 2016 x86_64 x86_64 Alert Count 1 First Seen 2016-10-26 21:32:08 NZDT Last Seen 2016-10-26 21:32:08 NZDT Local ID e80da5f0-0d75-4455-98a4-88392ce365dd Raw Audit Messages type=AVC msg=audit(1477470728.884:4348): avc: denied { read } for pid=31839 comm="httpd" name="gravel.jpg" dev="dm-0" ino=527480 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:home_bin_t:s0 tclass=file permissive=0 Hash: httpd,httpd_t,home_bin_t,file,read Additional info: reporter: libreport-2.7.2 hashmarkername: setroubleshoot kernel: 4.7.9-200.fc24.x86_64 type: libreport
Please run: # restorecon -Rv /var/www/html/ To fix your issue.