title: SELECT INTO OUTFILE can't write to file
body: <p>I'm trying to do a <code>SELECT INTO OUTFILE</code> and I'm getting the following error:</p>
  
  <pre><code>General error: 1 Can't create/write to file '/home/jason/projects/mcif/web/downloads/dump.csv' (Errcode: 13). Failing Query: "
  SELECT name
  INTO OUTFILE '/home/jason/projects/mcif/web/downloads/dump.csv'
  FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
  FROM account a
  </code></pre>
  
  <p>I know what the problem probably is: my <code>downloads</code> folder isn't writable by my MySQL user. I don't know how to solve this problem for two reasons:</p>
  
  <ul>
  <li>I don't know how to find out what the
  MySQL user is</li>
  <li>I don't know how to add the MySQL user to the users who are able to write to the <code>downloads</code> folder</li>
  </ul>
  
  <p>I'm on Ubuntu Linux. Can someone help me get past those two things?</p>