Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I have this file stored in my account. It's postgres dump. To be able to use postgres it seems that I have to execute the following command.

sudo su - postgres

Once I do this I am now working as the postgres user. What I need to be able to do is use the dump file (tied to my account ahcarpenter) as the postgres user. Any ideas as to how to go about this?

Or really simply just access the file located within my other account's directory within the postgres user's directory.

share|improve this question

If the file does not contain sensitive information, simply flag it as readable by anyone:

chmod o+r yourdumpfile

And then use it from the postgres user.

If it does contain sensitive information, then you should copy it to the postgres users's home directory, and chown it to them:

chown postgres /path/to/postgres/home/yourdumpfile
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.