Re: BUG #15265: The program "initdb" is needed by pg_ctl but was notfound in the same directory as "pg_ctl". - Mailing list pgsql-bugs

From Aaron W. Swenson
Subject Re: BUG #15265: The program "initdb" is needed by pg_ctl but was notfound in the same directory as "pg_ctl".
Date
Msg-id 20180709095422.GB11978@martineau.grandmasfridge.local
Whole thread Raw
In response to Re: BUG #15265: The program "initdb" is needed by pg_ctl but was notfound in the same directory as "pg_ctl".  (Mohammed Shahid Nawaz <mohammedshahid.r@gmail.com>)
Responses Re: BUG #15265: The program "initdb" is needed by pg_ctl but was notfound in the same directory as "pg_ctl".
List pgsql-bugs
On 2018-07-09 14:24, Mohammed Shahid Nawaz wrote:
> 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

It’s probably because /root has its access restricted to just the root
user, so the shahid user can’t get past that first part of the path.

Further, it’s atypical to allow users to do anything inside /root. You should
probably work under /usr/local or in /home/shahid/.

Attachment

pgsql-bugs by date:

Previous
From: Mohammed Shahid Nawaz
Date:
Subject: Re: BUG #15265: The program "initdb" is needed by pg_ctl but was notfound in the same directory as "pg_ctl".
Next
From: Mohammed Shahid Nawaz
Date:
Subject: Re: BUG #15265: The program "initdb" is needed by pg_ctl but was notfound in the same directory as "pg_ctl".