Lists: | austinpug |
---|
From: | Antony Loop <antonyloop(at)gmail(dot)com> |
---|---|
To: | austinpug(at)postgresql(dot)org |
Subject: | Help with "Permission Denied" |
Date: | 2010-07-20 18:14:47 |
Message-ID: | AANLkTiko6xsPmS_dzL7qTO8sMHAS2EFEUKsIQIAPQnW7@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | austinpug |
Dear Sirs:
Postgresql was installed normally from source code in Ubuntu Hardy Heron
with standard configuration.
But I receive a message "Permission denied" when trying to run a .sql script
to create tables
in a already created database. The script is located in /usr/local/pgsql
Any suggestions?
Session example:
root(at)tikal:/home/pakal# su - postgres
No directory, logging in with HOME=/
$ /usr/local/pgsql/bin/psql -U neil -d bpsimple
psql (8.4.4)
Type "help" for help.
bpsimple=#
bpsimple=# \i /usr/local/pgsql/create_tables-bpsimple.sql
/usr/local/pgsql/create_tables-bpsimple.sql: Permission denied
From: | Jon Erdman <postgresql(at)thewickedtribe(dot)net> |
---|---|
To: | Antony Loop <antonyloop(at)gmail(dot)com> |
Cc: | austinpug(at)postgresql(dot)org |
Subject: | Re: Help with "Permission Denied" |
Date: | 2010-07-20 18:55:30 |
Message-ID: | 4C45F122.1070308@thewickedtribe.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | austinpug |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 07/20/2010 01:14 PM, Antony Loop wrote:
>
> Dear Sirs:
>
> Postgresql was installed normally from source code in Ubuntu Hardy Heron
> with standard configuration.
>
> But I receive a message "Permission denied" when trying to run a .sql
> script to create tables
> in a already created database. The script is located in /usr/local/pgsql
>
> Any suggestions?
>
> Session example:
>
> root(at)tikal:/home/pakal# su - postgres
> No directory, logging in with HOME=/
>
> $ /usr/local/pgsql/bin/psql -U neil -d bpsimple
> psql (8.4.4)
> Type "help" for help.
>
> bpsimple=#
>
> bpsimple=# \i /usr/local/pgsql/create_tables-bpsimple.sql
> /usr/local/pgsql/create_tables-bpsimple.sql: Permission denied
The unix user postgres doesn't have permission to read the file
/usr/local/pgsql/create_tables-bpsimple.sql so as the user that owns
that file do:
chmod a+r /usr/local/pgsql/create_tables-bpsimple.sql
- --
Jon T Erdman (aka StuckMojo)
PostgreSQL Zealot
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkxF8SIACgkQRAk1+p0GhSEJSgCfXOM0uIAhDB/NcIr68EaaDKVQ
XXoAnArlZLdBWVHpLh++7k1HdtiMFcZ9
=IWQm
-----END PGP SIGNATURE-----
Attachment | Content-Type | Size |
---|---|---|
0x9D068521.asc | application/pgp-keys | 2.1 KB |
From: | Bryan Hinton <bryan(at)bryanhinton(dot)com> |
---|---|
To: | Antony Loop <antonyloop(at)gmail(dot)com> |
Cc: | austinpug(at)postgresql(dot)org |
Subject: | Re: Help with "Permission Denied" |
Date: | 2010-07-20 19:20:26 |
Message-ID: | 4C45F6FA.6070404@bryanhinton.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | austinpug |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
couple of items:
might want to set $HOME for postgres to /usr/local/pgsql
then chown create_tables-bpsimple.sql as appropriate
last of all, check \dp after you fix the file permissions - to make sure
neil can create tables
On 7/20/10 1:14 PM, Antony Loop wrote:
> Dear Sirs:
>
> Postgresql was installed normally from source code in Ubuntu Hardy Heron
> with standard configuration.
>
> But I receive a message "Permission denied" when trying to run a .sql script
> to create tables
> in a already created database. The script is located in /usr/local/pgsql
>
> Any suggestions?
>
> Session example:
>
> root(at)tikal:/home/pakal# su - postgres
> No directory, logging in with HOME=/
>
> $ /usr/local/pgsql/bin/psql -U neil -d bpsimple
> psql (8.4.4)
> Type "help" for help.
>
> bpsimple=#
>
> bpsimple=# \i /usr/local/pgsql/create_tables-bpsimple.sql
> /usr/local/pgsql/create_tables-bpsimple.sql: Permission denied
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.12 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJMRfb6AAoJENyAZH/azyeevkYP/0PRxi6whvROVchjtAY5CIFv
MeAsZww78njO6kvrZzJ6mxw2VQwfyAiU8dAveIjHNl6p4Qsg+wE8hRhWmELOkX4W
dW4CljaHoBw+S2ZF6zre+QnA8Owpu/MkujIOzD4zcYYxVgZNK7Rf9T4yQmwPwO7G
XH8oJghyZwQNZUoidzpktjDe0M9eX0DxS5k6Jz1vP0dpKTt0h6N2JOITrIEkasFm
QN97cdHGq7jqpBEsTsPI0CScbjuE7fYMw6hrjhRhp+9zopbrHxdrirZHuSrh1gOv
JPwxMGnNJYJWOmd31YmyhDJY/8BrQgRieLivomSY2wXosBtAUofdmuG73yHJxnfu
KWmzUY774wuX7/9eWvomZ7IqNYCD430dU0jjj+LF1mlMLuhITCTv6iOiuhPluQ6r
UDdZTzE0eK9sMUIAuSVJcU6U4S1s4JeCj4i3vdopLUKHomjZgkTsMypZxG9bfcmH
s8leqxASTT/QmGB8urMmpnrYxBGW8iR79fACuG2v/Oz/fJPMYHZPTVe3Fm8LgC1S
KW76wVaLFfdsyJK/bKIFXX4ZT3UPUtQBiOHCPpfrghprvrnKpFeWouRd3NDdBj2e
UwnxIE2JkbvL13kyYsHSE09dWkicZnD+7gV7QRkQy82oWK//wh9zmb0zEmOlFHwN
nl1eB6V0gVTw6DBUzBSI
=94xw
-----END PGP SIGNATURE-----
From: | Jon Erdman <postgresql(at)thewickedtribe(dot)net> |
---|---|
To: | Bryan Hinton <bryan(at)bryanhinton(dot)com> |
Cc: | Antony Loop <antonyloop(at)gmail(dot)com>, austinpug(at)postgresql(dot)org |
Subject: | Re: Help with "Permission Denied" |
Date: | 2010-07-20 23:24:54 |
Message-ID: | 4C463046.4090204@thewickedtribe.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | austinpug |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Look closer, the permission denied was on the actual .sql file he was
trying to read into psql...i.e. postgres user didn't have read on it,
filesystem wise ;)
- --
Jon T Erdman (aka StuckMojo)
PostgreSQL Zealot
On 07/20/2010 02:20 PM, Bryan Hinton wrote:
> couple of items:
> might want to set $HOME for postgres to /usr/local/pgsql
> then chown create_tables-bpsimple.sql as appropriate
> last of all, check \dp after you fix the file permissions - to make sure
> neil can create tables
>
> On 7/20/10 1:14 PM, Antony Loop wrote:
>> Dear Sirs:
>
>> Postgresql was installed normally from source code in Ubuntu Hardy Heron
>> with standard configuration.
>
>> But I receive a message "Permission denied" when trying to run a .sql script
>> to create tables
>> in a already created database. The script is located in /usr/local/pgsql
>
>> Any suggestions?
>
>> Session example:
>
>> root(at)tikal:/home/pakal# su - postgres
>> No directory, logging in with HOME=/
>
>> $ /usr/local/pgsql/bin/psql -U neil -d bpsimple
>> psql (8.4.4)
>> Type "help" for help.
>
>> bpsimple=#
>
>> bpsimple=# \i /usr/local/pgsql/create_tables-bpsimple.sql
>> /usr/local/pgsql/create_tables-bpsimple.sql: Permission denied
>
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkxGMEYACgkQRAk1+p0GhSE8zQCeM8Q9gswTViihMnL4VK/mWw5w
nNMAn1R13h7jIeNHLgoNRug/7sW3Ftqi
=Xl7Y
-----END PGP SIGNATURE-----
Attachment | Content-Type | Size |
---|---|---|
0x9D068521.asc | application/pgp-keys | 2.1 KB |
From: | Bryan Hinton <bryan(at)bryanhinton(dot)com> |
---|---|
To: | Jon Erdman <postgresql(at)thewickedtribe(dot)net> |
Cc: | Antony Loop <antonyloop(at)gmail(dot)com>, austinpug(at)postgresql(dot)org |
Subject: | Re: Help with "Permission Denied" |
Date: | 2010-07-21 00:42:34 |
Message-ID: | 4C46427A.3080004@bryanhinton.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | austinpug |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
chown postgres:postgres create_tables-bpsimple.sql && chmod 0640 $_
On 7/20/10 6:24 PM, Jon Erdman wrote:
>
>
> Look closer, the permission denied was on the actual .sql file he was
> trying to read into psql...i.e. postgres user didn't have read on it,
> filesystem wise ;)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.12 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJMRkJ5AAoJENyAZH/azyee840P/1FCf1vPtLG2XAoiK53wE6Et
hGxzU8hO6OisY18eW6F13rrRJ/E9lEIHFXFh3LWlGlaTMVNv38m4S1+DpOhP8lsd
IsZaTaCzVvyVtHj2Ix0mBxQN9bJJ/PMCU/hAx+np8hqnyMzYKBFxIlEtMoBj2tEX
GjiASbVW/vc8bYwbBwKoGR+T8RX6+6ft8MPPSYYAf/hPxxqI5CZQCTJIj9ZXVOqo
GUS0p624jRNUQxhNC/Fe+I63ldtLIn+8Yqgf0qjVza5vxel/Xj1I+4eYsJKJlB+7
esVKPl5Z/LaLhpJJ7JaBBWUqLXk2snufoJqFYaMntMjMhwzSgUG9qpYxB22f+RF+
hahXJGhKMKVjOgNmQDRqrrPJB+ZAtM7vDgHAyNar2jsQYd66zxdU8UbHvlg/s3VI
Nrifvfsd8NnNG9PLl4J61vuTxra52JNgPKbax24LIpmfnVE/l02Mnbjm2WigfNlC
m+WDbBzqmcD2J1fGQKjLZtnvJWuEYbYLMB7THk0WHMPdwjS9hFum0A7WXEP3VWW7
k8I2O/QOhphNYwos/xVbU61hw+dXXqgzYfLFvnY96NsgIM0Cjut86V76cSsFZMWC
zIYtWNpCRf5haJjP5BoPdKRiFwFa/b/NTV1i3dYHmj2eOP7bg3GLf4J9Fk2etn8t
n/eu4WlNJ5TwPie3UeM1
=y3eN
-----END PGP SIGNATURE-----