Running "sudo /etc/init.d/postgresql initdb" gives this: type=AVC msg=audit(1313902281.411:164863): avc: denied { create } for pid=28395 comm="mkdir" name="pg_log" scontext=staff_u:system_r:initrc_t:s0 tcontext=staff_u:object_r:postgresql_db_t:s0 tclass=dir type=AVC msg=audit(1313902281.424:164865): avc: denied { setattr } for pid=28396 comm="chown" name="pg_log" dev=vda2 ino=153795 scontext=staff_u:system_r:initrc_t:s0 tcontext=staff_u:object_r:postgresql_db_t:s0 tclass=dir -Robin
Could you add me your output of grep mkdir /etc/init.d/postgresql
Lets just change postgresql_manage_db to the following. # interface(`postgresql_manage_db',` gen_require(` type postgresql_db_t; ') manage_dirs_pattern($1, postgresql_db_t, postgresql_db_t) manage_files_pattern($1, postgresql_db_t, postgresql_db_t) manage_lnk_files_pattern($1, postgresql_db_t, postgresql_db_t) ')
I checked this change into F16, should be back ported to RHEL6.
I suppose it doesn't matter anymore, but since you asked: rlpowell@morji> sudo grep mkdir /etc/init.d/postgresql mkdir -p "$PGDATA" || return 1 mkdir "$PGDATA/pg_log" -Robin
Robin, thanks. I will add a patch from F16 which Dan added.
selinux-policy-3.9.16-39.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-39.fc15
Package selinux-policy-3.9.16-39.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing selinux-policy-3.9.16-39.fc15' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-39.fc15 then log in and leave karma (feedback).
selinux-policy-3.9.16-39.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.