title: How to solve a Linux permission issue for opencart
body: <p>I had used subversion to revert my PHP Opencart project, but I got a permission issue (sample shown below:</p>
  <blockquote>
  <p>Warning: imagejpeg(): Unable to open '/var/www/html/opencart/image/cache/data/pavblog/img-blog-620x300w.jpg' for writing: Permission denied in /var/www/html/opencart/system/library/image.php on line 45</p>
  <p>Warning: imagejpeg(): Unable to open '/var/www/html/opencart/image/cache/data/pavblog/img-blog-250x250w.jpg' for writing: Permission denied in /var/www/html/opencart/system/library/image.php on line 45</p>
  <p>Warning: imagejpeg(): Unable to open...</p>
  </blockquote>
  <p>I executed the below commands to add permissions to these folders, but I'm still getting the warning messages on my site.</p>
  <pre><code>sudo chmod 777 /var/www/html/opencart
  cd /var/www/html/opencart 
  sudo chmod 777 image/ 
  sudo chmod 777 image/cache/ 
  sudo chmod 777 image/data/ 
  sudo chmod 777 system/cache/ 
  sudo chmod 777 system/logs/ 
  sudo chmod 777 download/ 
  sudo chmod 777 config.php
  sudo chmod 777 admin/config.php
  </code></pre>
  <p>How can I fix this?</p>