pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedPermission problem with COPY FROM
4+ messages / 4 participants
[nested] [flat]
* Permission problem with COPY FROM
@ 1999-09-14 16:50 Stéphane FILLON <fillons@offratel.nc>
1999-09-15 04:21 ` Re: [HACKERS] Permission problem with COPY FROM Nuchanach Klinjun <nuchk@inet.co.th>
1999-09-15 16:14 ` Re: [SQL] Permission problem with COPY FROM Albert REINER <areiner@tph.tuwien.ac.at>
0 siblings, 2 replies; 4+ messages in thread
From: Stéphane FILLON @ 1999-09-14 16:50 UTC (permalink / raw)
To: pgsql-sql; pgsql-hackers <pgsql-hackers@postgresql.org>; pgsql-general <pgsql-general@postgresql.org>
Hi,
Each time I try to insert an ascii file with the COPY FROM command, I get the following message:
"ERROR: COPY command, running in backend with effective uid 501 (that's Postgres), could not open file '/usr/local/.../cltclr001' for reading. Error: Permission not allowed (13)."
What rights do I have to put to process the COPY command inside PSQL.
I have try nearly everything, actual rights: uog+rw even on the directory.
What's wrong.
Stephane FILLON
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [HACKERS] Permission problem with COPY FROM
1999-09-14 16:50 Permission problem with COPY FROM Stéphane FILLON <fillons@offratel.nc>
@ 1999-09-15 04:21 ` Nuchanach Klinjun <nuchk@inet.co.th>
1999-09-15 14:00 ` Re: [HACKERS] Permission problem with COPY FROM Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 4+ messages in thread
From: Nuchanach Klinjun @ 1999-09-15 04:21 UTC (permalink / raw)
To: Stéphane FILLON <fillons@offratel.nc>; +Cc: pgsql-sql; pgsql-hackers <pgsql-hackers@postgreSQL.org>; pgsql-general <pgsql-general@postgreSQL.org>
Hi,
I've faced that problem too, then I use '\copy' instread
of 'copy' because 'copy' command will asked for super user previlege.
example
^^^^^^ -> \copy '/your location/your filename' to tablename;
Cheers,
On Wed, 15 Sep 1999, [iso-8859-1] Stéphane FILLON wrote:
> Hi,
>
> Each time I try to insert an ascii file with the COPY FROM command, I get the following message:
>
> "ERROR: COPY command, running in backend with effective uid 501 (that's Postgres), could not open file '/usr/local/.../cltclr001' for reading. Error: Permission not allowed (13)."
>
> What rights do I have to put to process the COPY command inside PSQL.
>
> I have try nearly everything, actual rights: uog+rw even on the directory.
>
>
> What's wrong.
>
> Stephane FILLON
>
-----------------------------------------
Nuchanach Klinjun
R&D Project. Internet Thailand
Email: nuchk@inet.co.th
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [HACKERS] Permission problem with COPY FROM
1999-09-14 16:50 Permission problem with COPY FROM Stéphane FILLON <fillons@offratel.nc>
1999-09-15 04:21 ` Re: [HACKERS] Permission problem with COPY FROM Nuchanach Klinjun <nuchk@inet.co.th>
@ 1999-09-15 14:00 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 1999-09-15 14:00 UTC (permalink / raw)
To: Nuchanach Klinjun <nuchk@inet.co.th>; +Cc: Stéphane FILLON <fillons@offratel.nc>; pgsql-sql; pgsql-hackers <pgsql-hackers@postgreSQL.org>; pgsql-general <pgsql-general@postgreSQL.org>
Nuchanach Klinjun <nuchk@inet.co.th> writes:
> I've faced that problem too, then I use '\copy' instread
> of 'copy' because 'copy' command will asked for super user previlege.
> example
> ^^^^^^ -> \copy '/your location/your filename' to tablename;
It's not that; the error message Stephane quotes is after the
Postgres superuser-privilege check:
>> "ERROR: COPY command, running in backend with effective uid 501
>> (that's Postgres), could not open file '/usr/local/.../cltclr001' for
>> reading. Error: Permission not allowed (13)."
This is a result of the Unix kernel denying read access to the file.
It's got to be a matter of not having read rights on the file or not
having lookup (x) rights on one of the directories above it.
psql's \copy is often a better choice than the regular SQL COPY command,
though. It reads or writes the file with the privileges of the user
running psql, rather than those of the Postgres server, which is usually
a Good Thing. Also, if you are contacting a server on a different
machine, \copy works with files in the local filesystem, not the
server's filesystem.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [SQL] Permission problem with COPY FROM
1999-09-14 16:50 Permission problem with COPY FROM Stéphane FILLON <fillons@offratel.nc>
@ 1999-09-15 16:14 ` Albert REINER <areiner@tph.tuwien.ac.at>
1 sibling, 0 replies; 4+ messages in thread
From: Albert REINER @ 1999-09-15 16:14 UTC (permalink / raw)
To: pgsql-sql
On Wed, Sep 15, 1999 at 03:50:09AM +1100, Stéphane FILLON wrote:
...
>
> "ERROR: COPY command, running in backend with effective uid 501
> (that's Postgres), could not open file '/usr/local/.../cltclr001' for
> reading. Error: Permission not allowed (13)."
>
The problem does not seem to be with the permissions --- it has been
on the list a number of times already. Try using psql's \copy instead.
Albert.
--
---------------------------------------------------------------------------
Post an / Mail to / Skribu al: Albert Reiner <areiner@tph.tuwien.ac.at>
---------------------------------------------------------------------------
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~1999-09-15 16:14 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-09-14 16:50 Permission problem with COPY FROM Stéphane FILLON <fillons@offratel.nc>
1999-09-15 04:21 ` Nuchanach Klinjun <nuchk@inet.co.th>
1999-09-15 14:00 ` Tom Lane <tgl@sss.pgh.pa.us>
1999-09-15 16:14 ` Albert REINER <areiner@tph.tuwien.ac.at>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox