Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.postgresql > #200
| From | gargoyle60 <gargoyle60@example.invalid> |
|---|---|
| Newsgroups | comp.databases.postgresql |
| Subject | PostgreSQL 9.0 in Ubuntu Linux |
| Date | 2011-08-12 16:15 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <j23jjb$1ip$1@dont-email.me> (permalink) |
Need help! I am going around in circles trying to get a SQL script to run. I have installed PostgreSQL 9.0 in Ubuntu 11.04. Beforehand I manually created a data directory structure to isolate my personal data files (as myself, not using sudo): mkdir /home/gary/PostgreSQL/ mkdir /home/gary/PostgreSQL/9.0 mkdir /home/gary/PostgreSQL/9.0/data/ mkdir /home/gary/PostgreSQL/9.0/data/gjd_data mkdir /home/gary/PostgreSQL/9.0/data/gjd_data/gjd_sentinel_data I ran the PostgreSQL installation thus: sudo su ./postgresql-9.0.4-1-linux.bin accepting all the installer defaults except specifying the Data Directory as "/home/gary/PostgreSQL/9.0/data/gjd_data/gjd_sentinel_data" (NB. quotes shown here for emphasis only, not entered to the installer) I have a personal project database script file (copied from my Windows installation) that I know works perfectly under Windows. It has been modified for the correct paths/locations, etc. for Linux. When run this should create my entire project database, including loading sample data. This script file is called "Z_Build_DB_Linux.sql" I am trying to run as follows (long command, line wrapped here): /opt/PostgreSQL/9.0/bin/psql --dbname postgres --host localhost --port 5432 --username postgres --file /home/gary/PostgreSQL/9.0/data/gjd_data/ Z_Build_DB_Linux.sql --log-file /home/gary/PostgreSQL/9.0/data/gjd_data/ Z_Build_DB_Linux.log --output /home/gary/PostgreSQL/9.0/data/gjd_data/ Z_Build_DB_Linux_query_output.log --expanded This is where I hit a wall! It doesn't matter if I run this as user "gary" or "root". I have tried different combinations/variations, including having "chowned" directory "gjd_sentinel_data" to user postgres. Similarly with chgrp. This is my environment (sorry, lines wrapping again): root@GJDPC2:~$ export PGHOME=/opt/postgres/9.0 root@GJDPC2:~$ export PGDATA=/home/gary/PostgreSQL/9.0/data/gjd_data <...snip> root@GJDPC2:/home/gary/PostgreSQL/9.0/data/gjd_data# ls -l total 48 drwxrwxrwx 13 postgres postgres 4096 2011-08-12 15:21 gjd_sentinel_data -rw-r--r-- 1 root root 10701 2011-08-12 16:46 Z_Build_DB_Linux.log -rw-r--r-- 1 root root 231 2011-08-12 16:46 Z_Build_DB_Linux_query_output.log -rwxr--r-- 1 gary gary 20808 2011-08-12 16:32 Z_Build_DB_Linux.sql* root@GJDPC2:/home/gary/PostgreSQL/9.0/data/gjd_data# /opt/PostgreSQL/9.0/ bin/psql --dbname postgres --host localhost --port 5432 --username postgres --file /home/gary/PostgreSQL/9.0/data/gjd_data/ Z_Build_DB_Linux.sql --log-file /home/gary/PostgreSQL/9.0/data/gjd_data/ Z_Build_DB_Linux.log --output /home/gary/PostgreSQL/9.0/data/gjd_data/ Z_Build_DB_Linux_query_output.log --expanded Password ... psql:/home/gary/PostgreSQL/9.0/data/gjd_data/Z_Build_DB_Linux.sql:48: ERROR: could not set permissions on directory "/home/gary/PostgreSQL/9.0/ data/gjd_data/gjd_sentinel_data": Permission denied ... The problem, obviously, is the "Permission denied" error. What/where am I going wrong?
Back to comp.databases.postgresql | Previous | Next — Next in thread | Find similar
PostgreSQL 9.0 in Ubuntu Linux gargoyle60 <gargoyle60@example.invalid> - 2011-08-12 16:15 +0000
Re: PostgreSQL 9.0 in Ubuntu Linux Mladen Gogala <no@email.here.invalid> - 2011-08-12 22:06 +0000
Re: PostgreSQL 9.0 in Ubuntu Linux gargoyle60 <gargoyle60@example.invalid> - 2011-08-13 10:28 +0100
Re: PostgreSQL 9.0 in Ubuntu Linux "Laurenz Albe" <invite@spam.to.invalid> - 2011-08-22 10:51 +0200
Re: PostgreSQL 9.0 in Ubuntu Linux gargoyle60 <gargoyle60@example.invalid> - 2011-08-22 11:06 +0100
Re: PostgreSQL 9.0 in Ubuntu Linux "Laurenz Albe" <invite@spam.to.invalid> - 2011-08-22 16:59 +0200
Re: PostgreSQL 9.0 in Ubuntu Linux Fredrik Jonson <fredrik@jonson.org> - 2011-08-13 11:07 +0000
Re: PostgreSQL 9.0 in Ubuntu Linux gargoyle60 <gargoyle60@example.invalid> - 2011-08-13 12:20 +0100
Re: PostgreSQL 9.0 in Ubuntu Linux Fredrik Jonson <fredrik@jonson.org> - 2011-08-13 11:33 +0000
Re: PostgreSQL 9.0 in Ubuntu Linux Fredrik Jonson <fredrik@jonson.org> - 2011-08-13 11:21 +0000
Re: PostgreSQL 9.0 in Ubuntu Linux gargoyle60 <gargoyle60@example.invalid> - 2011-08-13 12:28 +0100
Re: PostgreSQL 9.0 in Ubuntu Linux Mladen Gogala <gogala.mladen@gmail.com> - 2011-08-13 15:54 +0000
Re: PostgreSQL 9.0 in Ubuntu Linux Fredrik Jonson <fredrik@jonson.org> - 2011-08-14 06:32 +0000
Re: PostgreSQL 9.0 in Ubuntu Linux Mladen Gogala <gogala.mladen@gmail.com> - 2011-08-14 21:40 +0000
csiph-web