X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1D8B58BA2FB for ; Mon, 21 Feb 2005 12:38:38 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 47508-10 for ; Mon, 21 Feb 2005 12:38:30 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by svr1.postgresql.org (Postfix) with ESMTP id 509D58BA172 for ; Mon, 21 Feb 2005 12:38:32 +0000 (GMT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1D3Clz-0007pG-T4 for pgsql-admin@postgresql.org; Mon, 21 Feb 2005 13:34:47 +0100 Received: from 200-101-054-239.bsace705.dsl.brasiltelecom.net.br ([200.101.54.239]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Feb 2005 13:34:47 +0100 Received: from cviniciusm by 200-101-054-239.bsace705.dsl.brasiltelecom.net.br with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Feb 2005 13:34:47 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-admin@postgresql.org From: Vinicius Subject: Re: Having problem with postgresql configuration (template1 doesn't Date: Mon, 21 Feb 2005 09:37:51 -0300 Lines: 64 Message-ID: References: <15094.1108921716@sss.pgh.pa.us> <15926.1108930090@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 200-101-054-239.bsace705.dsl.brasiltelecom.net.br User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: pt-br, pt In-Reply-To: <15926.1108930090@sss.pgh.pa.us> X-Gmane-MailScanner: Found to be clean X-Gmane-MailScanner: Found to be clean X-Gmane-MailScanner-SpamScore: ssss X-MailScanner-From: sql-pgsql-admin@m.gmane.org X-MailScanner-To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.655 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/186 X-Sequence-Number: 16354 Tom Lane escreveu: > Vinicius writes: > >>I tryed to create another data dir because I don't have the template1 >>database. > > > I think you got bit by one of the early-FC3 selinux policy bugs; see > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=142607 > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=143208 > > You probably want to rm -rf /var/lib/pgsql/data/ and try again > after making sure (a) you have the latest postgres and selinux > packages and (b) you've done restorecon on /var/lib/pgsql and > /var/log/pgsql. > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 7: don't forget to increase your free space map settings > I did do "rm -fr /var/lib/pgsql/data/" (a) I have the lastest *stable postgres package* from Fedora Core 3; (b) I did do restorecon on "/var/lib/pgsql" and on "/var/log/pgsql". now it pass the "...creating template1 database in /var/lib/pgsql/data/base/1... ok" but stop at "... 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" /var/log/messages shows: "... Feb 21 09:10:43 ronin kernel: audit(1108987843.094:0): avc: denied { read } for pid=6766 exe=/usr/bin/postgres path=/tmp/sh-thd-1108997049 (deleted) dev=dm-0 ino=1046660 scontext=user_u:system_r:postgresql_t tcontext=user_u:object_r:tmp_t tclass=file Feb 21 09:10:43 ronin kernel: audit(1108987843.423:0): avc: denied { read } for pid=6767 exe=/usr/bin/postgres path=/tmp/sh-thd-1108980215 (deleted) dev=dm-0 ino=1046660 scontext=user_u:system_r:postgresql_t tcontext=user_u:object_r:tmp_t tclass=file Feb 21 09:10:43 ronin kernel: audit(1108987843.480:0): avc: denied { read } for pid=6768 exe=/usr/bin/postgres path=/tmp/sh-thd-1109000142 (deleted) dev=dm-0 ino=1046660 scontext=user_u:system_r:postgresql_t tcontext=user_u:object_r:tmp_t tclass=file Feb 21 09:10:43 ronin kernel: audit(1108987843.542:0): avc: denied { read } for pid=6769 exe=/usr/bin/postgres path=/tmp/sh-thd-1108983044 (deleted) dev=dm-0 ino=1046660 scontext=user_u:system_r:postgresql_t tcontext=user_u:object_r:tmp_t tclass=file" I think "/usr/bin/postgres" was tried to write to a file in "/tmp" and was denied. And I still don't get the template1 database. Thanks.