I still cannot get this to work.
Here is SELinux error:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
SELinux is preventing /usr/sbin/httpd from setattr access on the directory /var/www/html/GetSimple/data.
***** Plugin restorecon (48.3 confidence) suggests *************************
If you want to fix the label.
/var/www/html/GetSimple/data default label should be httpd_sys_rw_content_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /var/www/html/GetSimple/data
***** Plugin httpd_write_content (48.3 confidence) suggests ****************
If you want to allow httpd to have setattr access on the data directory
Then you need to change the label on '/var/www/html/GetSimple/data'
Do
# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/GetSimple/data'
# restorecon -v '/var/www/html/GetSimple/data'
***** Plugin catchall_boolean (4.32 confidence) suggests *******************
If you want to unify HTTPD handling of all content files.
Then you must tell SELinux about this by enabling the 'httpd_unified' boolean.
Do
setsebool -P httpd_unified 1
***** Plugin catchall (0.97 confidence) suggests ***************************
If you believe that httpd should be allowed setattr access on the data directory 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:
# grep httpd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp
Additional Information:
Source Context system_u
ystem_r:httpd_t
0
Target Context unconfined_u:object_r:httpd_sys_content_t
0
Target Objects /var/www/html/GetSimple/data [ dir ]
Source httpd
Source Path /usr/sbin/httpd
Port <Unknown>
Host Chris-PC
Source RPM Packages httpd-2.2.17-1.fc14
Target RPM Packages
Policy RPM selinux-policy-3.9.7-31.fc14
Selinux Enabled True
Policy Type targeted
Enforcing Mode Enforcing
Host Name Chris-PC
Platform Linux Chris-PC 2.6.35.11-83.fc14.i686 #1 SMP Mon
Feb 7 07:04:18 UTC 2011 i686 i686
Alert Count 60
First Seen Sat 12 Mar 2011 11:52:26 GMT
Last Seen Sat 12 Mar 2011 12:18:17 GMT
Local ID ed7388ca-d817-43af-822d-f3b8bea35e8f
Raw Audit Messages
type=AVC msg=audit(1299932297.367:215): avc: denied { setattr } for pid=1558 comm="httpd" name="data" dev=dm-0 ino=804916 scontext=system_u
ystem_r:httpd_t
0 tcontext=unconfined_u:object_r:httpd_sys_content_t
0 tclass=dir
type=SYSCALL msg=audit(1299932297.367:215): arch=i386 syscall=chmod success=no exit=EACCES a0=1b58f5c a1=1ff a2=134f2e8 a3=1b52e44 items=0 ppid=1545 pid=1558 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm=httpd exe=/usr/sbin/httpd subj=system_u
ystem_r:httpd_t
0 key=(null)
Hash: httpd,httpd_t,httpd_sys_content_t,dir,setattr
audit2allow
#============= httpd_t ==============
#!!!! This avc can be allowed using the boolean 'httpd_unified'
allow httpd_t httpd_sys_content_t:dir setattr;
audit2allow -R
#============= httpd_t ==============
#!!!! This avc can be allowed using the boolean 'httpd_unified'
allow httpd_t httpd_sys_content_t:dir setattr;
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
When I apply the fix
# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/GetSimple/data'
# restorecon -v '/var/www/html/GetSimple/data'
I just get the same error message! ie:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<,
SELinux is preventing /usr/sbin/httpd from setattr access on the directory /var/www/html/GetSimple/data.
***** Plugin restorecon (48.3 confidence) suggests *************************
If you want to fix the label.
/var/www/html/GetSimple/data default label should be httpd_sys_rw_content_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /var/www/html/GetSimple/data
***** Plugin httpd_write_content (48.3 confidence) suggests ****************
If you want to allow httpd to have setattr access on the data directory
Then you need to change the label on '/var/www/html/GetSimple/data'
Do
# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/GetSimple/data'
# restorecon -v '/var/www/html/GetSimple/data'
***** Plugin catchall_boolean (4.32 confidence) suggests *******************
If you want to unify HTTPD handling of all content files.
Then you must tell SELinux about this by enabling the 'httpd_unified' boolean.
Do
setsebool -P httpd_unified 1
***** Plugin catchall (0.97 confidence) suggests ***************************
If you believe that httpd should be allowed setattr access on the data directory 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:
# grep httpd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp
Additional Information:
Source Context system_u
ystem_r:httpd_t
0
Target Context unconfined_u:object_r:httpd_sys_content_t
0
Target Objects /var/www/html/GetSimple/data [ dir ]
Source httpd
Source Path /usr/sbin/httpd
Port <Unknown>
Host Chris-PC
Source RPM Packages httpd-2.2.17-1.fc14
Target RPM Packages
Policy RPM selinux-policy-3.9.7-31.fc14
Selinux Enabled True
Policy Type targeted
Enforcing Mode Enforcing
Host Name Chris-PC
Platform Linux Chris-PC 2.6.35.11-83.fc14.i686 #1 SMP Mon
Feb 7 07:04:18 UTC 2011 i686 i686
Alert Count 60
First Seen Sat 12 Mar 2011 11:52:26 GMT
Last Seen Sat 12 Mar 2011 12:18:17 GMT
Local ID ed7388ca-d817-43af-822d-f3b8bea35e8f
Raw Audit Messages
type=AVC msg=audit(1299932297.367:215): avc: denied { setattr } for pid=1558 comm="httpd" name="data" dev=dm-0 ino=804916 scontext=system_u
ystem_r:httpd_t
0 tcontext=unconfined_u:object_r:httpd_sys_content_t
0 tclass=dir
type=SYSCALL msg=audit(1299932297.367:215): arch=i386 syscall=chmod success=no exit=EACCES a0=1b58f5c a1=1ff a2=134f2e8 a3=1b52e44 items=0 ppid=1545 pid=1558 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm=httpd exe=/usr/sbin/httpd subj=system_u
ystem_r:httpd_t
0 key=(null)
Hash: httpd,httpd_t,httpd_sys_content_t,dir,setattr
audit2allow
#============= httpd_t ==============
#!!!! This avc can be allowed using the boolean 'httpd_unified'
allow httpd_t httpd_sys_content_t:dir setattr;
audit2allow -R
#============= httpd_t ==============
#!!!! This avc can be allowed using the boolean 'httpd_unified'
allow httpd_t httpd_sys_content_t:dir setattr;
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
PLEASE can someone help me fix this?
NB
Link to my post on Fedora Forum about this:
http://forums.fedoraforum.org/showthread.php?t=259774