Re: BUG #5267: initdb fails on AIX: could not identify current directory

From: Michael Felt <mamfelt(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5267: initdb fails on AIX: could not identify current directory
Date: 2010-01-07 14:29:40
Message-ID: 9ade2d511001070629n34683062n240d9b1a124139b0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

michael(at)x054:[/data/home/
michael]ls -ld /
drwxr-xr-x 27 root system 4096 Jan 04 17:20 /
michael(at)x054:[/data/home/michael]ls -ld /usr

drwxr-xr-x 43 root system 4096 Jan 05 13:40 /usr
michael(at)x054:[/data/home/michael]ls -ld /usr/local

drwxr-xr-x 19 root system 4096 Jan 05 13:32 /usr/local
michael(at)x054:[/data/home/michael]ls -ld /usr/local/pgsql

drwxr-xr-x 7 root system 256 Jan 05 13:45 /usr/local/pgsql
michael(at)x054:[/data/home/michael]ls -ld /usr/local/pgsql/data

drwxr-xr-x 2 postgres postgres 256 Jan 05 13:45
/usr/local/pgsql/data
michael(at)x054:[/data/home/michael]ls -ld /usr/local/pgsql/bin
drwxr-xr-x 2 root system 4096 Jan 05 13:33
/usr/local/pgsql/bin

To answer the other question: root:system was the original owner. Changed to
pgsql before calling application. Because of the error I made the group,
changed user postgres to be postgres:postgres by default and made the
directory postgres:postgres.

I suppose I could turn on audit and see if it is trying to access a hard
coded directory. But, in any case, I would update the error message to at
least mention the directory name it is having issues with.

On Wed, Jan 6, 2010 at 5:03 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> "Michael Felt" <mamfelt(at)gmail(dot)com> writes:
> > I have compiled postgresql on AIX 6.1 without a great deal of difficulity
> > (./configure -without-readline -without-zlib).
>
> > However, the fist step - initdb - fails. I have not been able to
> determine
> > which directory it is complaining about.
>
> > could not identify current directory: The file access permissions do not
> > allow the specified action.
>
> This message means that getcwd() failed, apparently with an EACCESS
> code. Typically what that means is that some parent directory of
> the current directory is not readable or searchable by the user you
> ran initdb as.
>
> I believe that initdb also invokes getcwd for the directory that
> its own executable is in, and possibly for the target data directory,
> so you should check the paths leading to those as well.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-01-07 14:35:52 Re: BUG #5267: initdb fails on AIX: could not identify current directory
Previous Message Alvaro Herrera 2010-01-07 14:16:11 Re: email addresses