Re: archive command Permission Denied?

From: Jason Long <mailing(dot)list(at)supernovasoftware(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: archive command Permission Denied?
Date: 2008-11-07 23:22:18
Message-ID: 4914CDAA.3000809@supernovasoftware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> I wrote:
>
>> That's just bizarre. The permissions on the script itself seem to be
>> fine, so the only theory that comes to mind is the server doesn't have
>> search (x) permission on one of the containing directory levels ...
>>
>
> Oh, wait, I bet I've got it: you're using a SELinux-enabled system and
> SELinux doesn't believe that it's a good idea to let the Postgres server
> execute something out of its data directory.
*I am using Centos 5.2 and is looks like there is SELinux. This is the
first time it has caused me a problem so far.*

> That would explain why the
> other methods of executing the script work --- typical SELinux policy is
> a lot stricter on network-exposed daemon processes than other stuff.
>
> If that is what's happening, you'll find "avc denied" messages in the
> system log that correlate to the archive failures.
>
>
*I did not see anything like this in my logs.*
> The solution I'd recommend is putting the script someplace that's more
> usual to store scripts.
*I moved this inside the postgres data directory. I will post back the
results. If this does not work I will have my Linux consultant have a
look. Thank you very much for the advice.*
> You might be able to do something with changing
> the "security context" on the script file instead, but I'm not sure
> exactly what to change it to.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-11-07 23:25:58 Re: Show all commands executed
Previous Message Anderson dos Santos Donda 2008-11-07 22:50:37 Show all commands executed