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 639378BAFB4 for ; Sun, 20 Feb 2005 19:05:35 +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 56803-05 for ; Sun, 20 Feb 2005 19:05:29 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by svr1.postgresql.org (Postfix) with ESMTP id C90E58BAFE9 for ; Sun, 20 Feb 2005 19:05:28 +0000 (GMT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1D2wLE-00073e-J1 for pgsql-admin@postgresql.org; Sun, 20 Feb 2005 20:02:04 +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 ; Sun, 20 Feb 2005 20:02:04 +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 ; Sun, 20 Feb 2005 20:02:04 +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: Sun, 20 Feb 2005 16:05:11 -0300 Lines: 53 Message-ID: References: <15094.1108921716@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: <15094.1108921716@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.8 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/177 X-Sequence-Number: 16345 Tom Lane escreveu: > Vinicius writes: > >>postgres$ initdb -D /usr/local/pgsql/data" > > >>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 > > > You can't put the data directory in a nonstandard place under SELinux > unless you modify the security policy to allow the postgres daemon to > write in that nonstandard place. The normal behavior of > selinux-policy-targeted is to confine postgres to /var/lib/pgsql. > > So: (1) use /var/lib/pgsql/data, (2) modify the policy, or (3) > disable SELinux enforcement. > > BTW, since you are using the RPMs, why are you bothering with manual > database setup? "sudo /sbin/service postgresql start" is all you > need to do. > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > Thanks. I tryed to create another data dir because I don't have the template1 database. "# ls /var/lib/pgsql/data/base/1 1247 16386 16396 16406 16416 16601 16606 16611 16616 16621 16630 16635 16640 16647 16652 1249 16388 16398 16408 16418 16602 16607 16612 16617 16624 16631 16636 16641 16648 16653 1255 16390 16400 16410 16595 16603 16608 16613 16618 16625 16632 16637 16642 16649 pg_internal.init 1259 16392 16402 16412 16597 16604 16609 16614 16619 16626 16633 16638 16643 16650 PG_VERSION 16384 16394 16404 16414 16599 16605 16610 16615 16620 16629 16634 16639 16644 16651" How to workaround this, please? Should I remove the /var/lib/pgsql/data dir and create another with initdb command, please? TIA, Vinicius.