Skip site navigation (1) Skip section navigation (2)

Re: Installation layout is still hazardous for shared prefixes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Installation layout is still hazardous for shared prefixes
Date: 2000-09-29 14:15:27
Message-ID: 17133.970236927@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
"Oliver Elphick" <olly(at)lfix(dot)co(dot)uk> writes:
>> Tom Lane wrote:
>>> I think it would be a real bad idea to put the postmaster and postgres
>>> executables right in /usr/local/bin.  Perhaps it is time to think about
>>> a separate 'sbin' directory for programs that aren't supposed to be
>>> invoked by normal users.  Those two, initdb, initlocation, and ipcclean
  
> In the Debian package, I have put the administrator programs in
> /usr/lib/postgresql/bin.  The postgres user has that directory in its path
> so that all works properly.  Since root cannot run these, I don't think it
> appropriate to put them in /usr/sbin.

That seems like a good compromise to me.  From a more general
perspective I guess that install would see it as two separate target
directories for executables, which I suppose we'd describe as "user"
and "dbadmin" bin directories.  When installing one should have a
choice of a "traditional" setup (both user and admin exes go into
a single directory, eg /usr/local/pgsql/bin) or a "shared" setup
(user exes to a shared dir like /usr/local/bin, admin exes still go
to a private dir like /usr/local/pgsql/bin).

Offhand I'd make the division be user:

createdb dropdb ecpg pg-config pgaccess pgtclsh pgtksh psql

and admin:

createlang createuser droplang dropuser initdb initlocation ipcclean
pg_ctl pg_dump pg_dumpall pg_id pg_passwd pg_restore pg_upgrade postgres
postmaster vacuumdb

(Not sure about pg_dump/pg_dumpall/pg_restore; are these of any
significant use to non-superusers?)  This would keep createuser/dropuser
out of the shared bin directory, which certainly seem like the names
most likely to cause conflicts.

The man pages probably need to adopt the same division as the exes,
ie some to /usr/local/man and some to /usr/local/pgsql/man.

Note that it'd be a real bad idea to abandon the option of the
"traditional" install-tree configuration.  For people like me, with
three or four versions of Postgres hanging around on the same machine,
it's critical to be able to install everything into a single private
directory tree.

Comments?

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Adriaan JoubertDate: 2000-09-29 14:46:44
Subject: Strange error message
Previous:From: Peter EisentrautDate: 2000-09-29 12:37:10
Subject: Re: Bizarre behavior of default access permissions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group