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

Re: BUG #2776: unable to access created user directory

From: tomas(at)tuxteam(dot)de
To: Raghava <kraghavaiah(at)velankani(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2776: unable to access created user directory
Date: 2006-11-25 05:55:30
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Hash: SHA1

On Wed, Nov 22, 2006 at 10:56:16AM +0000, Raghava wrote:
> The following bug has been logged online:
> Bug reference:      2776
> Logged by:          Raghava
> Email address:      kraghavaiah(at)velankani(dot)com
> PostgreSQL version: 8.1.4
> Operating system:   RHEL
> Description:        unable to access created user directory
> Details: 
> hi,
> su postgres
> bash-3.00$  psql  finaldb
> finaldb=# \i /home/schema.sql
> with this installtion of schema is working fine. But if i place the
> schema.sql in created user directory
> i.e useradd raghav
> directory raghav get's created under home floder. If i place schema.sql
> /home/raghav folder and execute the following commands
> su postgres
> bash-3.00$  psql  finaldb
> finaldb=# \i /home/raghav/schema.sql
> with the iam getting "directory cannot be access".

This is supposed to work like that. It has nothing to do with
Postgresql, but with your Unix installation. It seems that by default on
your box one user is not allowed to read another user's home folder
(btw. we Unixers call that "directory"). This makes some sense.

>                                                    This iam able to resolve
> by executing the command chmod -R 777 /home/raghav.

Wow. So anyone could remove all files in /home/raghav now. Do you want

> But i have to handle this kind of issue through installtion script. Can u
> please suggest where are we are missing the configuration for postgres?

An installation script shold run as user postgres. The schema should be
part of the installation script and be readable by postgres.

If you have more questions we can continue off-list

- -- tomás
Version: GnuPG v1.4.1 (GNU/Linux)


In response to

pgsql-bugs by date

Next:From: Thomas H.Date: 2006-11-26 04:05:37
Subject: BUG #2780: could not fsync segment 0
Previous:From: Tom LaneDate: 2006-11-24 22:06:09
Subject: Re: PostgreSQL 8.1.5: regression tests fail on sparc

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