$ whomi
admin
$ pg_dump
(it works....)
$ sudo pg_dump
doesn't work. (permission denied)
$ sudo -u admin pg_dump
still doesn't work (permission denied).
why is that?
I need to run pg_dump from the context of being the user "www-data". How can I do that?