Tim Wilson wrote:
> I've got several Postgres databases on a machine that I need to backup. I've
> got a backup shell script that works fine, but it runs as the "postgres"
> user and I need a directory where I can save the backups. This is a Debian
> server.
> 
> I see there's a /var/backups folder so I thought maybe I would create a
> /var/backups/postgres folder and save the backups there. I set the
> permissions and ownership of the directory to:
> 
> drwxrwsr-x    2 root     postgres      160 Jan 27 13:50 postgres
> 
> I get the following error when I run the backup script as the postgres user:
> 
> pg_dump: [custom archiver] could not open archive file
> /var/backups/postgres/mtdb.out: Permission denied
> 
> What am I doing wrong?

Tim, 
try this:
su - 
su - postgres
cd /var/backups/postgres
touch some_file

does that work?

is the postgres user in the "postgres" group (see /etc/group)?
-- 
scot

_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list