Postgresql backup lacks permissions

SYSTEM INFORMATION
OS type and version Debian Linux 11
Webmin version 2.101
Usermin version 2.001
Virtualmin version 7.8.2
Theme version 21.04
Package updates All installed packages are up to date

Seems I’ve always had some ‘issues’ with permissions on postgres, especially with root access being denied. I’m not sure the template db is supposed to be accepting connections. I’m only showing this part but all of my sites are basically ‘Permission denied’.

Using the Webmin postgres module.

image

As time permits.
root@main:~# psql psql: error: FATAL: role "root" does not exist

root@main:~# su postgres

could not change directory to "/root": Permission denied
psql (13.11 (Debian 13.11-0+deb11u1))
Type "help" for help.

postgres=#

Not just the interface. Scheduled fails too. I have it set to mail on error:
Backup of database ycc to file /home/backup/postgresql/ycc.sql failed:
bash: line 1: /home/backup/postgresql/ycc.sql: Permission denied

If I su postgres from the command line I can do a pg_dumpall. I guess I couldn’t run it from the directory I was in previous.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.