To recreate the problem
I install FC3 on a server with SELINUX=enforcing and SELINUXTYPE=targeted
after, I install postgresql and do initdb with the user postgres
-bash-3.00$ /usr/bin/initdb The files belonging to this database system will be owned by user "postgres". This user must also own the server process.
The database cluster will be initialized with locale en_US.UTF-8.
fixing permissions on existing directory /var/lib/pgsql/data... ok creating directory /var/lib/pgsql/data/base... ok creating directory /var/lib/pgsql/data/global... ok creating directory /var/lib/pgsql/data/pg_xlog... ok creating directory /var/lib/pgsql/data/pg_clog... ok selecting default max_connections... 100 selecting default shared_buffers... 1000 creating configuration files... ok creating template1 database in /var/lib/pgsql/data/base/1... ok initializing pg_shadow... ok enabling unlimited row size for system tables... ok initializing pg_depend... ok creating system views... ok loading pg_description... ok creating conversions... ok setting privileges on built-in objects... ok creating information schema... initdb: failed
To fix that, i must to disable SELinux => SELINUX=disabled in /etc/sysconfig/selinux
restart my server
log in with the user posgres
rm -rf /var/lib/pgsql/data/* && /usr/bin/initdb
and that's work
Am Mi, den 19.01.2005 schrieb Daniel Chénard um 14:45:
I install FC3 on a server with SELINUX=enforcing and SELINUXTYPE=targeted
after, I install postgresql and do initdb with the user postgres
-bash-3.00$ /usr/bin/initdb
[ ... ]
creating information schema... initdb: failed
Daniel Chénard
Fedora Core 3 Update: selinux-policy-targeted-1.17.30-2.72
That update is installed? From it's update information:
"Allow postgresql to use ypbind and fix db creation calls."
Alexander
Sorry i have the selinux-policy-targeted-1.17.30-2.68
you're right, selinux-policy-targeted-1.17.30-2.72 fix it :-)
thank you
Le mercredi 19 janvier 2005 à 15:45 +0100, Alexander Dalloz a écrit :
Am Mi, den 19.01.2005 schrieb Daniel Chénard um 14:45:
I install FC3 on a server with SELINUX=enforcing and SELINUXTYPE=targeted
after, I install postgresql and do initdb with the user postgres
-bash-3.00$ /usr/bin/initdb
[ ... ]
creating information schema... initdb: failed
Daniel Chénard
Fedora Core 3 Update: selinux-policy-targeted-1.17.30-2.72
That update is installed? From it's update information:
"Allow postgresql to use ypbind and fix db creation calls."
Alexander
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
Daniel Chénard escreveu:
Sorry i have the selinux-policy-targeted-1.17.30-2.68
you're right, selinux-policy-targeted-1.17.30-2.72 fix it :-)
thank you
Le mercredi 19 janvier 2005 à 15:45 +0100, Alexander Dalloz a écrit :
Am Mi, den 19.01.2005 schrieb Daniel Chénard um 14:45:
I install FC3 on a server with SELINUX=enforcing and SELINUXTYPE=targeted
after, I install postgresql and do initdb with the user postgres
-bash-3.00$ /usr/bin/initdb
[ ... ]
creating information schema... initdb: failed
Daniel Chénard
Fedora Core 3 Update: selinux-policy-targeted-1.17.30-2.72
That update is installed? From it's update information:
"Allow postgresql to use ypbind and fix db creation calls."
Alexander
Hello,
I'm having problem with the configuration of postgresql. Can anybody help me, please?
I did do the followings steps as explained in the section "16.2. Creating a Database Cluster" of the "PostgreSQL 7.4.7 Documentation":
"root# mkdir /usr/local/pgsql/data root# chown postgres /usr/local/pgsql/data root# su postgres postgres$ initdb -D /usr/local/pgsql/data"
then shows:
"fixing permissions on existing directory /usr/local/pgsql/data... ok creating directory /usr/local/pgsql/data/base... ok creating directory /usr/local/pgsql/data/global... ok creating directory /usr/local/pgsql/data/pg_xlog... ok creating directory /usr/local/pgsql/data/pg_clog... ok selecting default max_connections... 10 selecting default shared_buffers... 50 creating configuration files... ok creating template1 database in /usr/local/pgsql/data/base/1... initdb: failed"
the file /var/log/messages shows: "Feb 20 02:01:38 ronin kernel: audit(1108875698.227:0): avc: denied { write } for pid=8229 exe=/usr/bin/postgres name=data dev=dm-0 ino=1687533 scontext=user_u:system_r:postgresql_t tcontext=root:object_r:usr_t tclass=dir Feb 20 02:01:38 ronin last message repeated 36 times Feb 20 02:01:38 ronin kernel: audit(1108875698.228:0): avc: denied { write } for pid=8229 exe=/usr/bin/postgres name=data dev=dm-0 ino=1687533 scontext=user_u:system_r:postgresql_t tcontext=root:object_r:usr_t tclass=dir Feb 20 02:01:38 ronin last message repeated 47 times Feb 20 02:01:38 ronin kernel: audit(1108875698.229:0): avc: denied { write } for pid=8229 exe=/usr/bin/postgres name=data dev=dm-0 ino=1687533 scontext=user_u:system_r:postgresql_t tcontext=root:object_r:usr_t tclass=dir Feb 20 02:01:38 ronin last message repeated 16 times Feb 20 02:01:38 ronin kernel: audit(1108875698.435:0): avc: denied { write } for pid=8305 exe=/usr/bin/postgres name=data dev=dm-0 ino=1687533 scontext=user_u:system_r:postgresql_t tcontext=root:object_r:usr_t tclass=dir Feb 20 02:01:38 ronin kernel: audit(1108875698.436:0): avc: denied { write } for pid=8305 exe=/usr/bin/postgres name=data dev=dm-0 ino=1687533 scontext=user_u:system_r:postgresql_t tcontext=root:object_r:usr_t tclass=dir Feb 20 02:01:38 ronin last message repeated 39 times Feb 20 02:01:38 ronin kernel: audit(1108875698.437:0): avc: denied { write } for pid=8305 exe=/usr/bin/postgres name=data dev=dm-0 ino=1687533 scontext=user_u:system_r:postgresql_t tcontext=root:object_r:usr_t tclass=dir Feb 20 02:01:38 ronin last message repeated 46 times Feb 20 02:01:38 ronin kernel: audit(1108875698.438:0): avc: denied { write } for pid=8305 exe=/usr/bin/postgres name=data dev=dm-0 ino=1687533 scontext=user_u:system_r:postgresql_t tcontext=root:object_r:usr_t tclass=dir Feb 20 02:01:38 ronin last message repeated 13 times Feb 20 02:01:52 ronin su(pam_unix)[8056]: session closed for user postgres"
I have: kernel-2.6.10-1.766_FC3 libselinux-1.19.1-8 libselinux-devel-1.19.1-8 selinux-policy-targeted-1.17.30-2.80 postgresql-7.4.7-1.FC3.2 postgresql-libs-7.4.7-1.FC3.2 postgresql-server-7.4.7-1.FC3.2
TIA, Vinicius.
Daniel Chénard wrote:
To fix that, i must to disable SELinux => SELINUX=disabled in /etc/sysconfig/selinux
restart my server
log in with the user posgres
rm -rf /var/lib/pgsql/data/* && /usr/bin/initdb
and that's work
Please fill a bug report , so the developers know that this bug exists... If you have any avc messages in /var/log/messages , it can be usefull to help debug the problem.
-- Pedro Macedo