Thread: Permission denied when executing a query from a file

Permission denied when executing a query from a file

From
Vincent DOYELLE
Date:
Hi all

I've just installed PG 7.0.3.8 on an RH 7.1. I'm a newbie in using PG. I've
got an error message "/home/vincent/Equip.sql : Permission denied" when
attempting executing a query in psql : \i /home/vincent/Equip.sql.

I'm trying to execute this query after doing su - postgres.

Can someone tell me why ?

TIA

Vincent

Re: Permission denied when executing a query from a file

From
"Joshua b. Jore"
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

That's likely because the postgres user doesn't have access to the
/home/vincent/Equip.sql file. Figure out your file unix permission.  This
isn't a PostgreSQL problem.

ls -l, chmod and chown are your friend. If you are really hard up consider
copying the sql into /tmp.

Joshua b. Jore
http://www.greentechnologist.org

On Fri, 19 Apr 2002, Vincent DOYELLE wrote:

> Hi all
>
> I've just installed PG 7.0.3.8 on an RH 7.1. I'm a newbie in using PG. I've
> got an error message "/home/vincent/Equip.sql : Permission denied" when
> attempting executing a query in psql : \i /home/vincent/Equip.sql.
>
> I'm trying to execute this query after doing su - postgres.
>
> Can someone tell me why ?
>
> TIA
>
> Vincent
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (OpenBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE8wtK1fexLsowstzcRAgWeAKCtMWkBc25tljqNmhvjONE1ms2bLQCfV+sS
6a9otR8e/ByVKF6dv6LzhGU=
=ls8l
-----END PGP SIGNATURE-----