title: How to change postgresql requiring "other" permission to import csv files
body: <p>I have recently changed to ubuntu from windows and am having difficulty with the permissions on my postgresql database which I am trying to recreate.</p>
  
  <p>My problem is as follows:
  I have a script which imports csv files into the postgresql database.
  The data is located in multiple csv files and I am using psycopg2 to handle the importing with a wrapper.</p>
  
  <p>However, there is an issue with user permissions.</p>
  
  <p>To run the file I need to manually change the permissions of each csv file (can do in bulk) so that the "other" permissions are set to read and write.</p>
  
  <p>Is this some issue with how I have set up the database initially? And if so, how can I rectify it.</p>
  
  <p>To clarify:</p>
  
  <blockquote>
    <blockquote>
      <blockquote>
        <p>I wish to know how to change my database settings to not require a manual permissions change to the "other" settings in order to allow import.</p>
      </blockquote>
    </blockquote>
  </blockquote>
  
  <p>Scripts added by request</p>
  
  <pre><code>import psycopg2 as psy
  import sys
  
  conn = psy.connect("dbname = 'name' host='localhost' user = 'postgres' password ='password')
  curs = conn.cursor()
  tablename = 'tabname'
  filename  = 'filename'
  
  Input = "COPY %s FROM %s WITH CSV HEADER" % (tablename, filename)
  curs.copy_expert(Input, sys.stdin)
  
  conn.commit()
  curs.close()
  conn.close()
  </code></pre>
  
  <p>This then has a wrapper around it to simply move between files and tables</p>
  
  <p>I know it works, however, it requires that I manually change the permissions of the csv files so that "others" may read and write them.</p>
  
  <p>I wish to know why this is the case</p>