From: | Mohammed Shahid Nawaz <mohammedshahid(dot)r(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org, PG Bug reporting form <noreply(at)postgresql(dot)org> |
Subject: | Re: BUG #15265: The program "initdb" is needed by pg_ctl but was not found in the same directory as "pg_ctl". |
Date: | 2018-07-07 06:00:57 |
Message-ID: | CAG5wiRznpn99x_AmymU9x+E6jh1zBB+QOkOXMRuW+fCz4JMfqA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hi Tom,
Thanks for the quick response.
The same build and, the same command works fine on a non-root user.
Since, this time i am running from a root login, the command i use is as
follows.
su - shahid -c '/root/pgsql10x/bin/pg_ctl -D /root/pgsql10x/data/ initdb'
The bin folder has 777 permission with the owner being shahid here.
If you see my post I have shared the ls-lrt output for reference.
I have been using the same command for my earlier 9.6.3 version of build,
and it worked without any trouble.
Thanks again,
Mohammed Shahid Nawaz
On Sat 7 Jul, 2018, 1:32 AM Tom Lane, <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> =?utf-8?q?PG_Bug_reporting_form?= <noreply(at)postgresql(dot)org> writes:
> > sudo -u shahid ./pg_ctl -D /root/pgsql10x/data/ initdb
> > invalid binary "/root/pgsql10x/bin/pg_ctl"
>
> I think you would get that error if pg_ctl is unable to stat itself,
> which might be due to a permissions problem. Are you sure the shahid
> user can read/exec all the directories in that path (particularly /root)?
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2018-07-07 07:10:37 | Re: long analyze, libc bug and libicu |
Previous Message | Michael Paquier | 2018-07-06 23:12:40 | Re: BUG #14999: pg_rewind corrupts control file global/pg_control |