Re: BUG #15265: The program "initdb" is needed by pg_ctl but was not found in the same directory as "pg_ctl".

From: Mohammed Shahid Nawaz <mohammedshahid(dot)r(at)gmail(dot)com>
To: "Aaron W(dot) Swenson" <titanofold(at)gentoo(dot)org>
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-09 09:59:50
Message-ID: CAG5wiRzgpgxbKDQQsN57ErKPe9ekzWPpZ3_xvUNhWv_k80fY0g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello Aaron,
Talking about the restrictions, I have given permissions to user Shahid, as
equivalent to root by editing the sudoers file.

I did not face this issue in earlier versions and the same setup and
command steps worked flawlessly.

I have even given su permission for user shahid to run su commands.

This was never the case with 9.6.3.

I have been running for past 1yr from root by using su / sudo commands to
initdb and start the database.

Thanks
Shahid

On Mon 9 Jul, 2018, 3:24 PM Aaron W. Swenson, <titanofold(at)gentoo(dot)org> wrote:

> 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/.
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Marc Cousin 2018-07-09 13:52:26 cannot restore schema with is not distinct from on hstore since PG 9.6.8
Previous 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".