title: How to allow permission to access CSV file using postgres in Ubuntu
body: <p>I am using the following command :</p>
  
  <pre><code>copy (select so.name,
        so.date_order,
        sol.name,
        sol.product_Id,
        sol.product_uom_qty , 
        ai.number, 
        ai.date_invoice , 
        so.amount_total , 
        so.amount_tax 
        from sale_order so , 
        sale_order_line sol , 
        account_invoice ai 
        where so.id = sol.order_id 
        and so.name = ai.origin 
        and ai.state='open') 
  
  to '/home/ekodev/Documents/test1.csv' delimiter ',' csv header;  
  </code></pre>
  
  <p>However, it gives the following error :</p>
  
  <pre><code>********** Error **********
  
  ERROR: must be superuser to COPY to or from a file
  SQL state: 42501
  Hint: Anyone can COPY to stdout or from stdin. psql's \copy command also works for anyone.
  </code></pre>
  
  <p>Even when I changed the permission <code>ekodev@partner:~/Documents$ sudo chmod a+rwX /home/ekodev/ /home/ekodev/Documents/ /home/ekodev/Documents/test1.csv</code></p>
  
  <p>It still does not work for me.</p>
  
  <p>Does anybody  know what the problem is?</p>