archive command Permission Denied? - Mailing list pgsql-general

From Jason Long
Subject archive command Permission Denied?
Date
Msg-id 4914B948.1020606@supernovasoftware.com
Whole thread Raw
Responses Re: archive command Permission Denied?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Please bear with me.  I am fairly new to Linux.

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

the contents are simply

ls -lrt /var/lib/pgsql/data/pg_xlog/ | mail -s "WAL files are:" myemail@mydomain.com

I also have this set up to run in the postgres users cron at 8 a.m.

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


I would appreciate any advice on what permission I need to set in order for this command to run.
-- 
Thank you for your time,

Jason Long
CEO and Chief Software Engineer
BS Physics, MS Chemical Engineering
http://www.octgsoftware.com
HJBug Founder and President
http://www.hjbug.com

pgsql-general by date:

Previous
From: Mike Toews
Date:
Subject: Re: Specifying text to substitute for NULLs in selects
Next
From: Mike Toews
Date:
Subject: Re: Specifying text to substitute for NULLs in selects