title: Opencart Fresh Installation Error: Failed to open stream: Permission denied
body: <p>I'm trying to install Opencart on a CentOS 7 Google Compute Cloud instance.I got this error when trying to install OC v3.0.3.2 </p>
  
  <pre><code>Warning: fopen(/var/www/webapp/system/storage/session//sess_d637dd9f9b2bc6b85077072329): failed to open stream: Permission denied in /var/www/webapp/system/library/session/file.php on line 29Warning: flock() expects parameter 1 to be resource, bool given in /var/www/webapp/system/library/session/file.php on line 31Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/webapp/system/library/session/file.php on line 33Warning: fflush() expects parameter 1 to be resource, bool given in /var/www/webapp/system/library/session/file.php on line 35Warning: flock() expects parameter 1 to be resource, bool given in /var/www/webapp/system/library/session/file.php on line 37Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/webapp/system/library/session/file.php on line 39
  </code></pre>
  
  <p>Here's what I've done so far:</p>
  
  <ul>
  <li>Read the install.txt and set permissions to files accordingly - Didn't work.</li>
  <li>Set permissions to 0777 for the whole webapp directory - Didn't work.</li>
  <li>Created the file.php file manually and changed permissions to 0777 - Didn't work.</li>
  <li>Changed file ownership to apache:apache and added my user account and root account to the apache group, set permissions to 0777 again - Didn't work.</li>
  <li>Plus, when I tried to install Wordpress to the same directory, WP installation didn't have permission to write the config.php file</li>
  <li>I've been trying this with more than a handful of different VM instances. All with same error.</li>
  </ul>
  
  <p>What am I missing? </p>