Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 455743 - /var/hts seems to have wrong selinux label
Summary: /var/hts seems to have wrong selinux label
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Hardware Certification Program
Classification: Red Hat
Component: Test Suite (harness)
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Greg Nichols
QA Contact: Lawrence Lim
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-07-17 14:59 UTC by Patrick C. F. Ernzer
Modified: 2014-03-26 00:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-27 22:57:44 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0047 normal SHIPPED_LIVE hts bug fix update 2009-01-27 22:57:30 UTC

Description Patrick C. F. Ernzer 2008-07-17 14:59:44 UTC
Description of problem:
I just installed hts on a fully up2date RHEL 4.6 box, trying to access
http://myhtserver/hts/ I get an avc denied

Version-Release number of selected component (if applicable):
hts-5.2-16.el4

How reproducible:
got this once, then just relabeled the files.

Steps to Reproduce:
1. have a fully up2date RHEL 4.6 machine
2. SELinux enforcing & targeted
2. up2date hts
3. point a web browser at http://myhtserver/hts/
  
Actual results:
==> /var/log/messages <==
Jul 17 17:01:22 london kernel: audit(1216303282.929:4): avc:  denied  { getattr
} for  pid=12112 comm="httpd" name="index.html" dev=dm-0 ino=360900
scontext=user_u:system_r:httpd_t tcontext=system_u:object_r:var_t tclass=file

==> /var/log/httpd/access_log <==
BROWSERIP - - [17/Jul/2008:17:01:22 +0300] "GET /hts/ HTTP/1.1" 403 296 "-"
"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20080409 Red
Hat/1.5.0.12-15.el5_1 Firefox/1.5.0.12"

==> /var/log/httpd/error_log <==
[Thu Jul 17 17:01:22 2008] [error] [client 172.21.220.117] (13)Permission
denied: access to /hts/index.html denied


Expected results:
# ls -Z /var/hts/
drwxr-xr-x  root     root     system_u:object_r:httpd_sys_content_t cgi
drwxr-xr-x  root     root     system_u:object_r:httpd_sys_content_t css
drwxr-xr-x  root     root     system_u:object_r:httpd_sys_content_t docs
drwxr-xr-x  root     root     system_u:object_r:httpd_sys_content_t images
-rw-r--r--  root     root     system_u:object_r:httpd_sys_content_t index.html


Additional info:
A)worked around the doc access bug with:
  1) create relabel-for-hts with the following content
  /var/hts(/.*)?          system_u:object_r:httpd_sys_content_t

  2) run "setfiles relabel-for-hts /var/hts"

B) not that it should matter for this, but the machine was used for the old rhr2
previously, so I did a "rpm -e rhr2-server" AFTER the "up2date hts"

Comment 2 Yan Tian 2009-01-19 02:23:54 UTC
Verified /var/hts show "system_u:object_r:httpd_sys_content_t" Selinux label in hts-5.3-12.

Comment 6 errata-xmlrpc 2009-01-27 22:57:44 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0047.html


Note You need to log in before you can comment on or make changes to this bug.