Bug 127900 - selinux-policy-targeted breaks file access for httpd
Summary: selinux-policy-targeted breaks file access for httpd
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Russell Coker
QA Contact: Ben Levenson
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: FC3Target FC3BugWeekQA
TreeView+ depends on / blocked
 
Reported: 2004-07-15 03:31 UTC by Nathan G. Grennan
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2004-10-05 23:22:44 UTC


Attachments (Terms of Use)

Description Nathan G. Grennan 2004-07-15 03:31:27 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Gecko/20040617 Galeon/1.3.16

Description of problem:
SELinux policy breaks file access for httpd. I can't retrieve
/var/www/html/vm/vm.exe aka http://hostname/vm/vm.exe. I also can't
see the file in the index listing for http://hostname/vm/

/etc/sysconfig/selinux:
SELINUX=enforcing
SELINUXTYPE=targeted

dmesg output:
audit(1089861367.288:0): avc:  denied  { getattr } for  pid=1847
exe=/usr/sbin/httpd path=/var/www/html/vm/vm.exe dev=md1 ino=611056
scontext=user_u:system_r:httpd_t tcontext=user_u:object_r:user_home_t
tclass=file

Version-Release number of selected component (if applicable):
policy-1.11.3-3.1

How reproducible:
Always

Steps to Reproduce:
1. mv file /var/www/html
2. Start httpd
3. Open a browser on another computer and try to retrieve the file

    

Actual Results:  Forbidden

Expected Results:  Download dialog

Additional info:

Comment 1 Nathan G. Grennan 2004-07-15 03:37:59 UTC
selinux-policy-targeted-1.15.3-1

The previous version had the same problem, and a tested workaround was
to disable selinux.

Comment 2 Daniel Walsh 2004-08-11 20:46:09 UTC
In order to get homedirectory access working with Targeted policy you
need to mark the files with httpd_user_content_t

chcon -t httpd_user_content_t /home/user/XYZ


Comment 3 Ben Levenson 2004-10-05 23:22:44 UTC
You need to change the context of the file after you relocate it
from your home directory to /var/www/html.
"restorecon /var/www/html/vm/vm.exe" should do the trick.

Closing as NOTABUG.


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