Re: archive command Permission Denied?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: archive command Permission Denied?
Дата
Msg-id 24808.1226096073@sss.pgh.pa.us
обсуждение исходный текст
Ответ на archive command Permission Denied?  (Jason Long <mailing.list@supernovasoftware.com>)
Ответы Re: archive command Permission Denied?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Jason Long <mailing.list@supernovasoftware.com> writes:
> I am working on archiving my WAL files.  For now I am just mailing
> myself a list of the directory contents using the following script.

> *-rwxr-xr-x 1 postgres postgres 87 Oct 28 20:23
> /var/lib/pgsql/mail-WAL-list.sh*

> I can run this when logged on as postgres and the cron runs fine as
> well, but I keep seeing the following in my logs.

> *LOG:  archive command failed with exit code 126
> DETAIL:  The failed archive command was: /var/lib/pgsql/mail-WAL-list.sh
> WARNING:  transaction log file "0000000100000000000000F0" could not be
> archived: too many failures
> sh: /var/lib/pgsql/mail-WAL-list.sh: Permission denied*

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 ... but
that's hard to believe seeing that your data directory is inside the
same tree.

[ thinks... ]  I believe that some flavors of Unix are picky about shell
scripts having a proper introducer line.  I'm not sure that would
manifest as "Permission denied", but does it work better if you
put "#! /bin/sh" as the first line of the script file?

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Mike Toews
Дата:
Сообщение: Re: Specifying text to substitute for NULLs in selects
Следующее
От: Tom Lane
Дата:
Сообщение: Re: archive command Permission Denied?