title: Django, permission error :OSError at /upload/ [Errno 13] Permission denied:
body: <p>I get this error when i try to upload an image:</p>
  
  <pre><code>OSError at /upload/
  
  [Errno 13] Permission denied: '/var/www/p/p/media/imgupload/img.png'
  </code></pre>
  
  <p>my virtualhost:  </p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerAdmin myemail@gmail.com
      ServerName p.com
      ServerAlias www.p.com
      DocumentRoot /var/www/p/
      LogLevel warn
      WSGIDaemonProcess processes=2 maximum-requests=500 threads=1
      WSGIProcessGroup %{GLOBAL}
      WSGIScriptAlias / /var/www/p/p/wsgi.py
      Alias /media /var/www/p/p/media/
      Alias /static /var/www/p/p/static/
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Here is the sec for the files:</p>
  
  <pre><code>drwxr-xr-x 3 ubuntu root     4096 Jun 16 13:10 www
  drwxr-xr-x 4 ubuntu ubuntu 4096 Jun 16 13:10 p
  (all other folders are ubuntu ubuntu)
  </code></pre>
  
  <p>while i got this:</p>
  
  <pre><code>drwxr-xr-x 36 ubuntu root     4096 Jun 11 06:33 lib
  drwx------ 6 mysql  mysql   4096 Jun 17 14:19 mysql
  </code></pre>
  
  <p>I can't cd through mysql with my ubuntu user...
  Is it some security issue??</p>
  
  <p>Must be...</p>
  
  <p>Thanks in advance</p>