From: | Mohammed Shahid Nawaz <mohammedshahid(dot)r(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Cc: | 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-09 08:54:14 |
Message-ID: | CAG5wiRyLDtVtu=61rgVLndU+gxvgL+B3m+uwEdRP4x+Sg4hFkg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hello Everyone,
Can anyone help me with this issue? As this is being a road block for me,
where I am able to run the commands in non-root login, but not from root
with sudo or su command.
Requesting help at the earliest.
Thanks in Advance. I
Shahid
On Sat 7 Jul, 2018, 11:30 AM Mohammed Shahid Nawaz, <
mohammedshahid(dot)r(at)gmail(dot)com> wrote:
> 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 | Aaron W. Swenson | 2018-07-09 09:54:22 | Re: BUG #15265: The program "initdb" is needed by pg_ctl but was not found in the same directory as "pg_ctl". |
Previous Message | Taiki Kondo | 2018-07-09 07:09:00 | RE: Typo in Japanese translation of psql. |