Lists: | pgsql-general |
---|
From: | "essay182(at)gmail(dot)com" <essay182(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | lo_import permissions problem |
Date: | 2005-12-02 03:03:23 |
Message-ID: | 102d2dbf0512011903g3e5a6733n72f0a8269de4e9c@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
I have been trying to import a file into a table using lo_import and keep
getting the error
ERROR: could not open server file "/tmp/myfile": Permission denied
The file is in /tmp so it is world readable and I made sure the file had the
correct permissions by doing chmod 777. My user has super user privileges as
well. I tried importing other files such as /etc/hosts as a test and this
worked fine. I am running Gentoo linux with Postgres 8.0. Does anyone have
any idea what the problem is and what I need to do to correct it?
Thanks in advance
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "essay182(at)gmail(dot)com" <essay182(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: lo_import permissions problem |
Date: | 2005-12-02 04:12:32 |
Message-ID: | 27629.1133496752@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
"essay182(at)gmail(dot)com" <essay182(at)gmail(dot)com> writes:
> I have been trying to import a file into a table using lo_import and keep
> getting the error
> ERROR: could not open server file "/tmp/myfile": Permission denied
> The file is in /tmp so it is world readable and I made sure the file had the
> correct permissions by doing chmod 777. My user has super user privileges as
> well. I tried importing other files such as /etc/hosts as a test and this
> worked fine. I am running Gentoo linux with Postgres 8.0. Does anyone have
> any idea what the problem is and what I need to do to correct it?
Hm, are you sure that the /tmp directory has world execute permissions?
The other thought that comes to mind is that SELinux creates an entire
new level of reasons for permissions failures. I have no idea whether
or not Gentoo has SELinux or runs it in enforcing mode by default ...
regards, tom lane
From: | "essay182(at)gmail(dot)com" <essay182(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: lo_import permissions problem |
Date: | 2005-12-02 06:43:49 |
Message-ID: | 102d2dbf0512012243w52f1892cxf25cfb4aae1508bb@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Tom,
Yep I have double checked my permissions on /tmp. You may be right with your
suggestion about SELinux. I was actually testing this on two boxes and one
is a Fedora box which I believe runs SELinux. I have gotten things to work
on the Gentoo box now. It would not work when I was logged in as root, but
with a less privileged account on the Gentoo box, things worked.
On 12/1/05, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> "essay182(at)gmail(dot)com" <essay182(at)gmail(dot)com> writes:
> > I have been trying to import a file into a table using lo_import and
> keep
> > getting the error
>
> > ERROR: could not open server file "/tmp/myfile": Permission denied
>
> > The file is in /tmp so it is world readable and I made sure the file had
> the
> > correct permissions by doing chmod 777. My user has super user
> privileges as
> > well. I tried importing other files such as /etc/hosts as a test and
> this
> > worked fine. I am running Gentoo linux with Postgres 8.0. Does anyone
> have
> > any idea what the problem is and what I need to do to correct it?
>
> Hm, are you sure that the /tmp directory has world execute permissions?
>
> The other thought that comes to mind is that SELinux creates an entire
> new level of reasons for permissions failures. I have no idea whether
> or not Gentoo has SELinux or runs it in enforcing mode by default ...
>
> regards, tom lane
>