Обсуждение: building from source requires postgres user account

Поиск
Список
Период
Сортировка

building from source requires postgres user account

От
"George Wilk"
Дата:

I’d like to use my own user account when building postgres from source.  When I follow directions on Sun’s page: http://docs.sun.com/app/docs/doc/819-5578/6n7lcpcl5?a=view I don’t have a problem, but running build under my own account runs into file permission issues after the build is done.

 

This is an important issue for me, as the postgres build is an integral part of a larger build process involving suite of products.  Is there a way to configure the account to be used during build?

 

My build.log shows:

 

LOG ############################# END ################################

LOG

LOG

LOG ############################# START ################################

LOG

LOG Setting permissions

LOG

LOG ----------------------------------------------------------------------

ERR cannot set file permissions

 

Thanks in advance,

 

~george

Re: building from source requires postgres user account

От
Tom Lane
Дата:
"George Wilk" <gwilk@ellacoya.com> writes:
> I'd like to use my own user account when building postgres from source.
> When I follow directions on Sun's page:
> http://docs.sun.com/app/docs/doc/819-5578/6n7lcpcl5?a=view I don't have a
> problem, but running build under my own account runs into file permission
> issues after the build is done.

Well, the default place to put the executables (/usr/local) is normally
not world-writable, so you should expect to have to do "make install" as
root.  If you want an entirely unprivileged installation, specify an
unprivileged install location to configure --prefix.  However, such
setups are normally not useful for much beyond testing purposes; if you
intend the database to be autostarted at system boot then the
executables really ought to be root-owned for security.

You certainly don't need to do configure and make as any particular
user.  The user you do "make install" as will determine the ownership
of the installed executables and other static files.  The user you do
"initdb" as will own the PGDATA directory and will need to be the userid
that the postmaster is started under.  These three can be different,
and none of them need to be named "postgres".

            regards, tom lane

Re: building from source requires postgres user account

От
Peter Eisentraut
Дата:
Am Donnerstag, 12. Juli 2007 16:22 schrieb George Wilk:
> I'd like to use my own user account when building postgres from source.
> When I follow directions on Sun's page:
> http://docs.sun.com/app/docs/doc/819-5578/6n7lcpcl5?a=view I don't have a
> problem, but running build under my own account runs into file permission
> issues after the build is done.

> My build.log shows:

Nothing in the build process requires a special user account or writes a file
named build.log or writes messages of that kind.  So please be more specific.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

Re: building from source requires postgres user account

От
"George Wilk"
Дата:
Tom,
I fixed my build problem.
Our build scenario is slightly atypical.  We are building and installing
postgres into a fake root directory and then creating a Solaris package for
bundling with our configuration manager component.

I am all set. Thanks!

Cheers,
~george

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Thursday, July 12, 2007 12:59 PM
To: George Wilk
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] building from source requires postgres user account

"George Wilk" <gwilk@ellacoya.com> writes:
> I'd like to use my own user account when building postgres from source.
> When I follow directions on Sun's page:
> http://docs.sun.com/app/docs/doc/819-5578/6n7lcpcl5?a=view I don't have a
> problem, but running build under my own account runs into file permission
> issues after the build is done.

Well, the default place to put the executables (/usr/local) is normally
not world-writable, so you should expect to have to do "make install" as
root.  If you want an entirely unprivileged installation, specify an
unprivileged install location to configure --prefix.  However, such
setups are normally not useful for much beyond testing purposes; if you
intend the database to be autostarted at system boot then the
executables really ought to be root-owned for security.

You certainly don't need to do configure and make as any particular
user.  The user you do "make install" as will determine the ownership
of the installed executables and other static files.  The user you do
"initdb" as will own the PGDATA directory and will need to be the userid
that the postmaster is started under.  These three can be different,
and none of them need to be named "postgres".

            regards, tom lane



Re: building from source requires postgres user account

От
"Joshua D. Drake"
Дата:
George Wilk wrote:
> I’d like to use my own user account when building postgres from source.
> When I follow directions on Sun’s page:
> http://docs.sun.com/app/docs/doc/819-5578/6n7lcpcl5?a=view I don’t have
> a problem, but running build under my own account runs into file
> permission issues after the build is done.

Well there is very little info here from you on the actual problem
but... my guess is that you didn't use --prefix to have postgresql
install into a directory structure that you control.

Joshua D. Drake

>
>
>
> This is an important issue for me, as the postgres build is an integral
> part of a larger build process involving suite of products.  Is there a
> way to configure the account to be used during build?
>
>
>
> My build.log shows:
>
>
>
> LOG ############################# END ################################
>
> LOG
>
> LOG
>
> LOG ############################# START ################################
>
> LOG
>
> LOG Setting permissions
>
> LOG
>
> LOG ----------------------------------------------------------------------
>
> ERR cannot set file permissions
>
>
>
> Thanks in advance,
>
>
>
> ~george
>


--

       === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive  PostgreSQL solutions since 1997
              http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/