Bug 471449 - Allowing httpd cgi scripts to write to nfs
Summary: Allowing httpd cgi scripts to write to nfs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-13 19:03 UTC by Orion Poplawski
Modified: 2008-12-18 22:05 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-12-18 22:05:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Orion Poplawski 2008-11-13 19:03:17 UTC
Description of problem:

I need to let cgi scripts write to nfs volumes.  I was seeing:

avc:  denied  {write } for  pid=26689 comm="processEvent.cg" name="badEvents.txt" dev=0:1a ino=8610036 scontext=system_u:system_r:httpd_suexec_t:s0 tcontext=system_u:object_r:nfs_t:s0 tclass=file
avc:  denied  {append } for  pid=26874 comm="processEvent.cg" name="badEvents.txt" dev=0:1a ino=8610036 scontext=system_u:system_r:httpd_suexec_t:s0 tcontext=system_u:object_r:nfs_t:s0 tclass=file

Tried turning on httpd_use_nfs but still saw the append error (write may still be an issue, but append may have been the only operation attempted at this point).


Using my own policy module to work around for now.

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

Comment 1 Miroslav Grepl 2008-12-12 10:08:44 UTC
Orion,

I have tried to reproduce this problem and if I turn on httpd_use_nfs:

# setsebool -P httpd_use_nfs 1 

I can write to nfs_t with httpd_suexec_t type.

Version-Release number of selected component:

selinux-policy-3.3.1-111.fc9.noarch
libselinux-2.0.61-1.fc9.i386
selinux-policy-devel-3.3.1-111.fc9.noarch
selinux-policy-targeted-3.3.1-111.fc9.noarch

Comment 2 Orion Poplawski 2008-12-18 22:05:16 UTC
Indeed, seems fixed.


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