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

Re: Postgresql 8.0.3, symbolic link to /var/lib/pgsql/data/base

From: Sergiusz Jarczyk <sergiusz(dot)jarczyk(at)qresc(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Postgresql 8.0.3, symbolic link to /var/lib/pgsql/data/base
Date: 2005-09-28 19:34:10
Message-ID: 433AF032.3090305@qresc.com (view raw or flat)
Thread:
Lists: pgsql-admin
Hi Jeffrey

Jeffrey Tenny wrote:

> I'm trying to move my databases to another drive.
>
> With postmaster off, I create:
>
> /home/pgsql
>
> mv /var/lib/pgsql/data/base /home/pgsql/
>
>
> I make sure that /home/pgsql is owned by postgres, and only 'rwx' for 
> the owner.  All the permissions look fine.
>
> from /var/lib/pgsql/data, I do
>
> ln -s /home/pgsql/base
>
> Of course the link permissions look like:
>
> lrwxrwxrwx  1 postgres postgres 16 Sep 28 14:21 base -> /home/pgsql/base
>
>
> The postmaster starts, but attempts to access the database complain 
> that permission is denied:
>
> $ psql -l
> psql: FATAL:  could not access directory "/var/lib/pgsql/data/base/1": 
> Permission denied
>
>
> Any clues about why this won't work?
> I've searched the archives, but most references were to invalid 
> permissions on the directories and I'm pretty sure I've got those right.
>
> All my pgsql dirs look pretty much like:
> drwx------   3 postgres postgres  4096 Sep 28 14:21 pgsql
>
> Both in the original /var/lib/pgsql area, and the /home/pgsql area.
>

Try to issue chown -R postgres.postgres /home/pgsql

Sergiusz


In response to

Responses

pgsql-admin by date

Next:From: Anjan DaveDate: 2005-09-28 19:40:46
Subject: Re: Postgresql 8.0.3, symbolic link to /var/lib/pgsql/data/base
Previous:From: HemapriyaDate: 2005-09-28 19:12:37
Subject: data corruption

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