From: | Shreesha <shreesha1988(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | fabriziomello(at)gmail(dot)com, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: How to change the pgsql source code and build it?? |
Date: | 2014-06-13 18:54:48 |
Message-ID: | CAPBNhTy8mUjA5ADaT4Vg5OfimSA-adrc7M8v25SjzNK8ud2bFQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
@Fabrizio de Royes Mello, Even upon making changes as per your suggestion,
I could see that initdb is failing for the same reason:
*******************************************************************************************************************
/mswitch/pgsql/bin # ./initdb -D ../data/
The files belonging to this database system will be owned by user "root".
This user must also own the server process.
The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory ../data ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 400kB
creating configuration files ... ok
creating template1 database in ../data/base/1 ... "root" execution of the
PostgreSQL server is not permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromise. See the documentation for
more information on how to properly start the server.
child process exited with exit code 1
initdb: removing contents of data directory "../data"
*******************************************************************************************************************
Please let me know if I need to make changes in any other place. Appreciate
your help!
On Fri, Jun 13, 2014 at 9:43 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= <fabriziomello(at)gmail(dot)com> writes:
> > On Thu, Jun 12, 2014 at 10:59 PM, Kyotaro HORIGUCHI <
> > horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> >> Try replacing these conditions with "(0 && geteuid() == 0)" and
> >> you would see it run as root.
>
> > Maybe a compile option like '--enable-run-as-root' could be added to
> allow
> > it without the need of change the source code.
>
> If we wanted it to be easy to run PG as root, those tests wouldn't be
> there in the first place. We don't want that, so there will never be
> anything to override that policy as easily as setting a configure option.
>
> In the case at hand, the OP wants to run on some weird system that
> apparently doesn't have multiple users at all. It's a pretty safe bet
> that hacking out those geteuid tests is just the tip of the iceberg of
> what he's going to have to change to make it work, because it probably
> deviates from typical-Unix-environment in a lot of other ways too.
> So I can't get too concerned about how easy this one aspect is for him.
>
> regards, tom lane
>
--
~Shreesha.
From | Date | Subject | |
---|---|---|---|
Next Message | Shreesha | 2014-06-13 19:12:37 | Re: How to change the pgsql source code and build it?? |
Previous Message | Alvaro Herrera | 2014-06-13 18:37:38 | ALTER TABLESPACE MOVE command tag tweak |