Commands linked to pg_wrapper not working with non-root users - Mailing list pgsql-general

From Jonathan Leroy - Inikup
Subject Commands linked to pg_wrapper not working with non-root users
Date
Msg-id CAC88fzE-ajOudW_Gath9N5W4ofr_OXWUCVc85mSu76N==738sw@mail.gmail.com
Whole thread Raw
Responses Re: Commands linked to pg_wrapper not working with non-root users
Re: Commands linked to pg_wrapper not working with non-root users
List pgsql-general
Hi,

I'm using multiples versions of PostgreSQL from the postgresql.org
repository (http://apt.postgresql.org/) on Debian Jessie, on multiples
servers.
Each postgresql-client-XX package depends on postgresql-client-common,
which provides the pg_wrapper script
(/usr/share/postgresql-common/pg_wrapper).

A lot of PostgreSQL commands are linked to pg_wrapper. E.g.:
/usr/bin/psql -> ../share/postgresql-common/pg_wrapper

Here's my issue : when I'm logged as an user which is not root or
postgresql, I can't use any of the commands linked to pg_wrapper:

user1@server1:~ $ /usr/bin/psql --version
Error: Invalid data directory


However, everything works with postgres or root user:

root@server1:~ # /usr/bin/psql --version
psql (PostgreSQL) 9.4.16


Also, everything works fine if I bypass pg_wrapper:

user1@server1:~ $ /usr/lib/postgresql/9.4/bin/psql --version
psql (PostgreSQL) 9.4.16

I am missing something ?

Thanks,

-- 
Jonathan Leroy


pgsql-general by date:

Previous
From: karthik kumar
Date:
Subject: Re: Fwd: Carto ODBC_FDW issue "ERROR: Connecting to driver" from PGto DB2
Next
From: Tom Lane
Date:
Subject: Re: Commands linked to pg_wrapper not working with non-root users