From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SMJUw-00023q-Ex for garchives@archives.gentoo.org; Mon, 23 Apr 2012 13:40:10 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 11CD7E0CD5; Mon, 23 Apr 2012 13:39:52 +0000 (UTC) Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com [209.85.214.53]) by pigeon.gentoo.org (Postfix) with ESMTP id D9AFBE0C45 for ; Mon, 23 Apr 2012 13:38:34 +0000 (UTC) Received: by bkcjm2 with SMTP id jm2so2243430bkc.40 for ; Mon, 23 Apr 2012 06:38:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=d1wN/RvCd8GdZPYtGc9I6A3mCT+PkG5WFni9YTkbKaU=; b=r8QjEvjji2KVbqAsME+LtRKr5iIVI3LPaJe6R/fh2fklNJw/3ddyWqN0TPdDY4aXLH NYXq/UoQGJONbZZrrgfXComRmVvZ08TZ9VnekJ/4NcP7IVTseFS8F9lv5DZw9efW67nx xIIUz/wnt4cY5wf7i2h8AVrvsevKikFIC7KleQwL5M5/CCSTJHhXJa+3mMN4qjRhCoyK mRWCwc7j6lMRa8EjPdFCvc03sz28k+YwMckp+zjd3Qo66D96KSZwNUZiG9e61LUsJqFi losZrHxqZPyWK6oj/ymfVaKnkZSRx7zEKEBRZPzqojTYeCdjMWws6WyywDz0nCM9sLAN bOFA== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.205.132.71 with SMTP id ht7mr4893456bkc.19.1335188313951; Mon, 23 Apr 2012 06:38:33 -0700 (PDT) Received: by 10.204.164.76 with HTTP; Mon, 23 Apr 2012 06:38:33 -0700 (PDT) In-Reply-To: <20120423132130.GA11404@squareownz.org> References: <20120423132130.GA11404@squareownz.org> Date: Mon, 23 Apr 2012 09:38:33 -0400 Message-ID: Subject: Re: [gentoo-user] Postgres suddenly can't access files in its /etc directory From: Michael Mol To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 2df2bd45-f3de-4461-b14f-c21664fd5a90 X-Archives-Hash: 439a859300cc460e04079504a529249a On Mon, Apr 23, 2012 at 9:21 AM, wrote: > I'm unsure if I should be posting this to the -hardened mailing list as > I'm using the hardened profile but all of a sudden I'm getting a rather > strange error when trying to start postgres. > > # /etc/init.d/postgresql-9.1 start > =C2=A0* Caching service dependencies ... =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0[ ok ] > =C2=A0* The following file(s) are not readable by 'postgres': > =C2=A0* =C2=A0 =C2=A0 /etc/postgresql-9.1/postgresql.conf > =C2=A0* =C2=A0 =C2=A0 /etc/postgresql-9.1/pg_ident.conf > =C2=A0* =C2=A0 =C2=A0 /etc/postgresql-9.1/pg_hba.conf > =C2=A0* HINT: Try: 'chmod 644 /etc/postgresql-9.1/*.conf' > =C2=A0* ERROR: postgresql-9.1 failed to start > > That's what I'm getting when I attempt to start it and I don't seem to ha= ve modified anything. > > Looking into the init script I can see it's doing su postgres -c "test -r= /etc/postgresql-9.1/pg_hba.conf" and the like but the output of: > =C2=A0 =C2=A0 =C2=A0 =C2=A0su postgres -c "test -r /etc/postgresql-9.1/pg= _hba.conf" || echo "fail" > is fail... so I'm quite at a loss as to what could be going on here. All = of the files are owned by postgres, have the correct permissions (I ran chm= od 644 as it hinted) and it should be able to traverse to the directory as = everything has the execute bit from /etc onwards. > > Any tips? I tend to go at these things with a bludgeon. Capture and grep the strace output for syscalls accessing those files, and you can see exactly what error message the system gives. Or you might see that it's not looking in the right place. --=20 :wq