From fillons@offratel.nc Tue Sep 14 18:16:07 1999 Received: from mail_dns.lagoon.nc (mail.offratel.nc [209.58.55.28]) by hub.org (8.9.3/8.9.3) with ESMTP id OAA36035; Tue, 14 Sep 1999 14:16:07 -0400 (EDT) (envelope-from fillons@offratel.nc) Received: from portable (unverified [209.58.55.166]) by mail_dns.lagoon.nc (Rockliffe SMTPRA 3.4.3) with SMTP id ; Wed, 15 Sep 1999 05:16:57 +1100 Message-ID: <000e01befedd$3e2210c0$a6373ad1@portable> From: "=?iso-8859-1?Q?St=E9phane_FILLON?=" To: "pgsql-sql" , "pgsql-hackers" , "pgsql-general" Subject: Permission problem with COPY FROM Date: Wed, 15 Sep 1999 03:50:09 +1100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0004_01BEFF2D.684ADB20" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 This is a multi-part message in MIME format. ------=_NextPart_000_0004_01BEFF2D.684ADB20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 ------=_NextPart_000_0004_01BEFF2D.684ADB20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
Each time I try to insert an ascii = file with the=20 COPY FROM command, I get the following message:
 
 "ERROR: COPY command, = running in=20 backend with effective uid 501 (that's Postgres), could not open file=20 '/usr/local/.../cltclr001' for reading. Error: Permission not allowed=20 (13)."
 
What rights do I have to put to = process the COPY=20 command inside PSQL.
 
I have try nearly everything, actual = rights:=20 uog+rw even on the directory.
 
 
What's wrong.
 
Stephane FILLON
------=_NextPart_000_0004_01BEFF2D.684ADB20-- From nuchk@inet.co.th Wed Sep 15 04:22:13 1999 Received: from johann.inet.co.th (nuchk@johann.inet.co.th [203.150.17.140]) by hub.org (8.9.3/8.9.3) with ESMTP id AAA16631; Wed, 15 Sep 1999 00:22:13 -0400 (EDT) (envelope-from nuchk@inet.co.th) Received: from localhost (nuchk@localhost) by johann.inet.co.th (8.9.0/8.9.0) with ESMTP id LAA04233; Wed, 15 Sep 1999 11:21:49 +0700 (GMT+0700) X-Authentication-Warning: johann.inet.co.th: nuchk owned process doing -bs Date: Wed, 15 Sep 1999 11:21:48 +0700 (GMT+0700) From: Nuchanach Klinjun To: =?iso-8859-1?Q?St=E9phane_FILLON?= cc: pgsql-sql , pgsql-hackers , pgsql-general Subject: Re: [HACKERS] Permission problem with COPY FROM In-Reply-To: <000e01befedd$3e2210c0$a6373ad1@portable> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by hub.org id AAB16676 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 From tgl@sss.pgh.pa.us Wed Sep 15 14:01:23 1999 Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA76341; Wed, 15 Sep 1999 10:01:23 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id KAA19100; Wed, 15 Sep 1999 10:00:02 -0400 (EDT) To: Nuchanach Klinjun cc: =?iso-8859-1?Q?St=E9phane_FILLON?= , pgsql-sql , pgsql-hackers , pgsql-general Subject: Re: [HACKERS] Permission problem with COPY FROM In-reply-to: Your message of Wed, 15 Sep 1999 11:21:48 +0700 (GMT+0700) Date: Wed, 15 Sep 1999 10:00:02 -0400 Message-ID: <19098.937404002@sss.pgh.pa.us> From: Tom Lane Nuchanach Klinjun 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 From areiner@tph.tuwien.ac.at Wed Sep 15 16:14:16 1999 Received: from frithjof.reiner (qmailr@a111.dialin.tuwien.ac.at [192.35.240.121]) by hub.org (8.9.3/8.9.3) with SMTP id MAA98661 for ; Wed, 15 Sep 1999 12:14:16 -0400 (EDT) (envelope-from areiner@tph.tuwien.ac.at) Received: (qmail 10861 invoked by uid 500); 15 Sep 1999 16:14:11 -0000 From: "Albert REINER" Date: Wed, 15 Sep 1999 18:14:10 +0200 To: pgsql-sql Subject: Re: [SQL] Permission problem with COPY FROM Message-ID: <19990915181410.A10830@frithjof> Mail-Followup-To: pgsql-sql References: <000e01befedd$3e2210c0$a6373ad1@portable> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-3 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 0.95.6i In-Reply-To: =?iso-8859-3?Q?=3C000e01befedd$3e2210c0$a6373ad1=40portable=3E=3B_from_S?= =?iso-8859-3?Q?t=E9phane_FILLON_on_Wed=2C_Sep_15=2C_1999_at_03:50:09AM_+?= =?iso-8859-3?Q?1100?= 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 ---------------------------------------------------------------------------