Re: Trouble installing on XP home

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Trouble installing on XP home
Дата
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE6C7F26@algol.sollentuna.se
обсуждение исходный текст
Ответ на Trouble installing on XP home  ("Dave M" <dave@consultant.com>)
Список pgsql-admin
> Here are the steps I performed and the generated messages:
>
> 1)I ran the install program (postgresql-8.1) the data
> directory chosen is a folder located in a NTFS logical drive
> (F:\PostgreSQL\), the remainder of the drive being of FAT type.
>
> error message: "Failed to run initdb: 1!"
> the initdb log reads as follows:
>
>
> --------------------------------------------------------------
> ----------------------------------
>     The files belonging to this database system will be
> owned by user "postgresusr".
>     This user must also own the server process.
>
>     The database cluster will be initialized with locale C.
>
>     fixing permissions on existing directory F:/PostgreSQL
> ... initdb: could not change permissions of directory
> "F:/PostgreSQL": Permission denied
>
> --------------------------------------------------------------
> ----------------------------------

This is your problem. The service account must have permissions on the
directory you install to. See the FAQ.


> 2) I ran the install again, but this time uncheck 'install as service'
> I opened a Command Prompt and executed the following:
>
>     cd \program files\postgresql\8.1\bin
>     initdb --locale=C --username=postgres -W -A md5 -E
> UNICODE -D f:\postgresql
>
> I get the following:
>
> --------------------------------------------------------------
> ----------------------
> The files belonging to this database system will be owned by
> user "postgres".
> This user must also own the server process.
>
> The database cluster will be initialized with locale C.
>
> fixing permissions on existing directory f:/postgresql ... ok
> creating directory f:/postgresql/global ... ok creating
> directory f:/postgresql/pg_xlog ... ok creating directory
> f:/postgresql/pg_xlog/archive_status ... ok creating
> directory f:/postgresql/pg_clog ... ok creating directory
> f:/postgresql/pg_subtrans ... ok creating directory
> f:/postgresql/pg_twophase ... ok creating directory
> f:/postgresql/pg_multixact/members ... ok creating directory
> f:/postgresql/pg_multixact/offsets ... ok creating directory
> f:/postgresql/base ... ok creating directory
> f:/postgresql/base/1 ... ok creating directory
> f:/postgresql/pg_tblspc ... ok selecting default
> max_connections ... 10 selecting default shared_buffers ...
> 50 creating configuration files ... ok creating template1
> database in f:/postgresql/base/1 ...
>
> Execution of PostgeSQL by a user with administrative
> permissions is not permitted.
> The server must be started under an unpriviledged user ID to
> prevent possible system security compromises. See the
> documentation for more information on how to properly start
> the server.
> child process was terminated by signal 1
> initdb: removing contents of data directory "f:/postgresql"
> --------------------------------------------------------------
> -------------------------

You need to run this as the service user, not as yourself. This user
must not be an admin. This is also in the FAQ.


> 3)so I try the following command:
>
>     runas /user:postgres cmd
>
> then run initdb again as previously and get the following:
>
> --------------------------------------------------------------
> -------------------------
> The files belonging to this database system will be owned by
> user "postgres".
> This user must also own the server process.
>
> The database cluster will be initialized with locale C.
>
> fixing permissions on existing directory f:/postgresql ...
> initdb: could not change permissions of directory
> "F:/PostgreSQL": Permission denied'
> --------------------------------------------------------------
> -------------------------

And you're back at needing to grant permissions to the service account
on f:\postgresql. The FAQ lists the required permissions.


//Magnus

В списке pgsql-admin по дате отправления:

Предыдущее
От: Ciprian Hodorogea
Дата:
Сообщение: Re: pg_dump - txt sql vs binary
Следующее
От: Arnau
Дата:
Сообщение: Where is my bottleneck?