dbTalk Databases Forums  

[BUGS] BUG #2776: unable to access created user directory

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2776: unable to access created user directory in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Raghava
 
Posts: n/a

Default [BUGS] BUG #2776: unable to access created user directory - 11-24-2006 , 03:22 PM







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,

We have uninstalled postgres-7.1.4 and successfully installed
postgres-8.1.4. After installtion we have created database with name
"finaldb" and with postgres user. I wanted to give a schema file (schema.sql
) file as input for this finaldb. Here are the steps iam doing and
schema.sql is in home directory.

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 iam able to resolve
by executing the command chmod -R 777 /home/raghav.

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?

Regards,
Raghava

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

Reply With Quote
  #2  
Old   
tomas@tuxteam.de
 
Posts: n/a

Default Re: [BUGS] BUG #2776: unable to access created user directory - 11-25-2006 , 02:19 AM






-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Nov 22, 2006 at 10:56:16AM +0000, Raghava wrote:
Quote:
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.

Quote:
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
that?

Quote:
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

regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFFZ9rSBcgs9XrR2kYRAp4dAJ9goEqmx8f7wXWZ3JEPzV CAV9VWHACfV+GC
XQylmdsHc0+no0Wi2DoOGJs=
=Afea
-----END PGP SIGNATURE-----


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.