title: Permission denied when I try to restore postgres backup
body: <p>Recently I used this command to make a backup of my postgres databases</p>
  
  <pre><code>pg_dumpall &gt; BkpOldPG.sql
  </code></pre>
  
  <p>After removing the old version of postgres I downloaded the last version <strong>9.4</strong> and I have tried to restore my old data using :</p>
  
  <pre><code>mody@debian:~$ su postgres
  Password: 
  postgres@debian:/home/mody$
  postgres@debian:/home/mody$ /usr/lib/postgresql/9.4/bin/psql -d postgres -f Documents/Bkp01dPg.sql 
  Documents/Bkp01dPg.sql: Permission denied
  </code></pre>
  
  <p>As you can see I get <strong>Permission denied</strong> so I tried using <strong>sudo</strong> but it doesn't work :</p>
  
  <pre><code>postgres@debian:/home/mody$ sudo /usr/lib/postgresql/9.4/bin/psql -d postgres -f Documents/Bkp01dPg.sql 
  [sudo] password for postgres: 
  postgres is not in the sudoers file.  This incident will be reported.
  </code></pre>
  
  <p>any help with that please ?</p>
  
  <p>Thanks!</p>