public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: napalm@squareownz.org
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Postgres suddenly can't access files in its /etc directory
Date: Mon, 23 Apr 2012 17:44:32 +0200	[thread overview]
Message-ID: <20120423154432.GA29725@squareownz.org> (raw)
In-Reply-To: <4F956A86.8060105@orlitzky.com>

[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]

On Mon, Apr 23, 2012 at 10:43:18AM -0400, Michael Orlitzky wrote:
> On 04/23/12 09:21, napalm@squareownz.org 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
> >  * Caching service dependencies ...                                      [ ok ]
> >  * The following file(s) are not readable by 'postgres':
> >  *     /etc/postgresql-9.1/postgresql.conf
> >  *     /etc/postgresql-9.1/pg_ident.conf
> >  *     /etc/postgresql-9.1/pg_hba.conf
> >  * HINT: Try: 'chmod 644 /etc/postgresql-9.1/*.conf'
> >  * 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 have 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:
> > 	su 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 chmod 644 as it hinted) and it should be able to traverse to the directory as everything has the execute bit from /etc onwards.
> > 
> 
> You can `su postgres` and then try to read the files yourself. That
> should reveal the problem.
> 

Interestingly I can't `su postgres` even though I have set it a shell,
thanks for the tip though, I'm getting closer!

[-- Attachment #2: Type: application/pgp-signature, Size: 316 bytes --]

  reply	other threads:[~2012-04-23 15:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-23 13:21 [gentoo-user] Postgres suddenly can't access files in its /etc directory napalm
2012-04-23 13:38 ` Michael Mol
2012-04-23 14:43 ` Michael Orlitzky
2012-04-23 15:44   ` napalm [this message]
2012-04-23 15:56     ` Michael Orlitzky
2012-04-23 21:18       ` napalm
2012-04-24  5:27         ` Graham Murray
2012-04-24  9:31           ` napalm
2012-04-24 13:58             ` Michael Orlitzky
2012-04-24 16:28         ` Stroller
2012-04-26  5:46 ` J. Roeleveld
2012-04-26 10:01   ` napalm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120423154432.GA29725@squareownz.org \
    --to=napalm@squareownz.org \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox