[Centos] PostgreSQL & SELinux problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi.

I just installed Centos 4.  I'm pretty sure that I chose to have it 
install postgresql but when the system came up, it wasn't there.  No 
worries.  I installed it from the net with 'yum'.  Unfortunately, when I 
started it up and it tried to init the database, I got a bunch of 
SELinux errors:

Mar  3 13:24:22 dirty kernel: audit(1109874262.006:0): avc:  denied  { 
read } for  pid=3138 exe=/usr/bin/postgres path=/tmp/sh-thd-1109856265 
(deleted) dev=md2 ino=377572 scontext=root:system_r:postgresql_t 
tcontext=root:object_r:tmp_t tclass=file
Mar  3 13:24:22 dirty kernel: audit(1109874262.195:0): avc:  denied  { 
read } for  pid=3139 exe=/usr/bin/postgres path=/tmp/sh-thd-1109873603 
(deleted) dev=md2 ino=377572 scontext=root:system_r:postgresql_t 
tcontext=root:object_r:tmp_t tclass=file
Mar  3 13:24:22 dirty kernel: audit(1109874262.218:0): avc:  denied  { 
read } for  pid=3140 exe=/usr/bin/postgres path=/tmp/sh-thd-1109855677 
(deleted) dev=md2 ino=377572 scontext=root:system_r:postgresql_t 
tcontext=root:object_r:tmp_t tclass=file
Mar  3 13:24:22 dirty kernel: audit(1109874262.250:0): avc:  denied  { 
read } for  pid=3141 exe=/usr/bin/postgres path=/tmp/sh-thd-1109872502 
(deleted) dev=md2 ino=377572 scontext=root:system_r:postgresql_t 
tcontext=root:object_r:tmp_t tclass=file
Mar  3 13:24:25 dirty postgresql: Starting postgresql service:  succeeded

I was able to get it working by doing:

service postgresql stop
rm -rf ~postgres/data
setenforce 0
service postgresql start
setenforce 1

I haven't tested it very well but it seems to have worked so far.

-Vic



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux