Bug 449045 - selinux-policy-targeted 3.3.1-55 prevents httpd from starting with non-standard DocumentRoot
Summary: selinux-policy-targeted 3.3.1-55 prevents httpd from starting with non-standa...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-30 00:49 UTC by Peter Blomgren
Modified: 2008-05-30 12:49 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-30 12:49:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Peter Blomgren 2008-05-30 00:49:09 UTC
Description of problem:
Start of httpd fails with message

Starting httpd: Syntax error on line 280 of /etc/httpd/conf/httpd.conf:
DocumentRoot must be a directory


Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.3.1-55.fc9.noarch

How reproducible:
Always

Steps to Reproduce:
1. service httpd start
2.
3.
  
Actual results:
Starting httpd: Syntax error on line 280 of /etc/httpd/conf/httpd.conf:
DocumentRoot must be a directory


Expected results:
httpd starts

Additional info:
Line#280 is:
DocumentRoot "/home/myself/SYNC/public_html"

Raw Audit Messages:

host=[xxx] type=AVC msg=audit(1212108073.443:35): avc: denied { search } for
pid=4701 comm="httpd" name="SYNC" dev=sda8 ino=6398195
scontext=unconfined_u:system_r:httpd_t:s0
tcontext=unconfined_u:object_r:user_home_t:s0 tclass=dir 

host=[xxx] type=SYSCALL msg=audit(1212108073.443:35): arch=c000003e syscall=4
success=no exit=-13 a0=7fbac939c218 a1=7fffd0b7b300 a2=7fffd0b7b300 a3=c items=0
ppid=4700 pid=4701 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0
fsgid=0 tty=pts1 ses=1 comm="httpd" exe="/usr/sbin/httpd"
subj=unconfined_u:system_r:httpd_t:s0 key=(null)

Comment 1 Daniel Walsh 2008-05-30 12:49:47 UTC
If you customize the settings on your machine, you also need to customize the
SELinux settings.  

Turn on the SELinux Boolean

setsebool -P httpd_enable_homedirs 1

Fix your labeleing

# semanage fcontext -a -t httpd_sys_content_t '/home/myself/SYNC/public_html(/.*)?'
# restorecon -R -v /home/myself/SYNC/public_html



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