Re: [GENERAL] reatedb: database creation failed on mydb

From: Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il>
To: taipan(at)shofiah(dot)kusza(dot)edu(dot)my, pgsql-lists <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] reatedb: database creation failed on mydb
Date: 1999-06-06 14:22:27
Message-ID: l03130307b38033e807c4@[147.233.159.109]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 12:50 +0300 on 03/06/1999, taipan(at)shofiah(dot)kusza(dot)edu(dot)my wrote:

> first I issue (under postgrest user)
> createuser user_id
> then under that user_id I run
> initlocation ~/sql/data
> then I run
> createdb -D ~/sql/data mydb
>
> at this stage I get an error msg as below:
> ERROR: Unable to create database directory ~/sql/data/base/mydb
> createdb: database creation failed on mydb.
>
> what should I do now? I tried to find it in archives but i can't find it.
> FYI I'm using postgres v 6.3 running under RedHat.

I think I know what the problem is. Remember that the one that creates the
database is the backend process. It basically creates a directory and
several files. It needs to be able to write in the location you specified.

Now, the backend process belongs to user postgres, whereas the directory in
which you want it to create the database belongs to the user user_id. So,
you have to give permission for writing to the postgres user in that
directory.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Herouth Maoz 1999-06-06 14:27:04 Re: [GENERAL] PL/pgSQL help
Previous Message 최진백 1999-06-06 10:16:38 alter table