Backup : pgdumps permission denied
Kaor opened this issue · comments
Kaor commented
When launch backup script or pg_dump command, i have an error to write inro pgdumps directory :
root@loomio:/srv/loomio-deploy# docker exec loomio-db su - postgres -c 'pg_dump -O -Fc loomio_production -f /pgdumps/loomio_production.dump'
pg_dump: [custom archiver] could not open output file "/pgdumps/loomio_production.dump": Permission denied
if i change permissions like pgdata directory no problem.
Robert Guthrie commented
it's trying to write to a directory mapped into the container from the host.
You'll have a loomio-deploy/pg_dumps folder, does it have open permissions? try chmod 0777 pg_dumps and see if that fixes it.
Sorry I'm really bad a permissions stuff, and warn you that 777 is not good on a system with other users.