Answers.Body: <p>Disabling SELinux worked, but only as a workaround. This particular issue was on a Staging server, so disabling SEL was not a huge issue.</p>
  
  <p>However, I would highly recommend not anyone else do this for a Production environment unless they really know what they're doing in terms of permissions.</p>
  
  <p>Good luck.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-19T20:05:11.043Z
Answers.LastActivityDate: 2019-08-19T20:05:11.043Z
Answers.UserDisplayName: Palmtree Studios
Body: <p>I've configured Apache vHosts on a local box and installed a Craft 3 website onto it. This new instance will serve as my "staging" environment for an upcoming website.</p>
  
  <ul>
  <li>I've installed with composer from a Git repo of my work-in-progress site.</li>
  </ul>
  
  <p>Everything installed fine, and I can access the site through my browser. However, the site displays the error message:</p>
  
  <blockquote>
    <p>/var/www/vhosts/wine/storage isn't writable by PHP. Please fix that. </p>
  </blockquote>
  
  <p>Now, I've run into this before, normally I would just chmod 775 and chown the folder to apache. But, this isn't working. I've even chmod 777 on the folder and it still gives me the error message.</p>
  
  <p>An ls -la on the storage folder gives me (currently 774):</p>
  
  <pre><code>drwxrwxr--.  2  apache apache 
  </code></pre>
  
  <p>This should be working.
  I've been at it for 4 hours, and I'm at a loss. If anyone has any ideas, please let me know.</p>
  
  <ul>
  <li>CentOS 7 </li>
  <li>Apache 2.4.6 </li>
  <li>PHP 7.2.20</li>
  </ul>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-16T20:30:53.763Z
Comments.Text: I'm assuming Apache is configured to run PHP as `apache:apache`?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-19T18:01:30.443Z
Comments.Text: Yes, that's correct @BradBell
Comments.UserDisplayName: Palmtree Studios
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-19T18:07:57.687Z
Comments.Text: Actually, @BradBell I'm not 100% sure of this. I know Apache is set to exclusively run as apache:apache, and I'm assuming PHP uses that configuration as well.  However, any of the PHP modules might be running as some other user, and I'm unsure of how to check this.
Comments.UserDisplayName: Palmtree Studios
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-19T20:03:34.990Z
Comments.Text: So, an update: Disabling SELinux allowed apache/PHP proper access, which seems to suggest ther MUST be a SEL policy set up. However, this is also weird, because I did set up a policy on storage at one point to no avail. Oh well, since this is a staging server, I'm going to leave SEL disabled. If I have the same issues on Production, I'll investigate further.  If you have any advice @BradBell, please let me know. Thanks.
Comments.UserDisplayName: Palmtree Studios
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-19T22:00:30.357Z
Comments.Text: Huh... I've got zero experience with SEL.
Comments.UserDisplayName: Brad Bell
Tags: <craft3><config><install><installation><permissions>
Title: New Install, Permission Errors With /storage
ThreadText: # New Install, Permission Errors With /storage
  
  (Asked by: username_0 on 2019-08-16)
  
  I've configured Apache vHosts on a local box and installed a Craft 3 website onto it. This new instance will serve as my "staging" environment for an upcoming website.
  
  * I've installed with composer from a Git repo of my work-in-progress site.
  
  Everything installed fine, and I can access the site through my browser. However, the site displays the error message:
  
  > /var/www/vhosts/wine/storage isn't writable by PHP. Please fix that.
  
  Now, I've run into this before, normally I would just chmod 775 and chown the folder to apache. But, this isn't working. I've even chmod 777 on the folder and it still gives me the error message.
  
  An ls -la on the storage folder gives me (currently 774):
  
  ```
  drwxrwxr--.  2  apache apache 
  
  ```
  
  This should be working.
  I've been at it for 4 hours, and I'm at a loss. If anyone has any ideas, please let me know.
  
  * CentOS 7
  * Apache 2.4.6
  * PHP 7.2.20
  
  **Tags:** craft3, config, install, installation, permissions
  
  > **Comments:**
  > **username_1**: I'm assuming Apache is configured to run PHP as `apache:apache`?  
  > **username_0**: Yes, that's correct @username_1  
  > **username_0**: Actually, @username_1 I'm not 100% sure of this. I know Apache is set to exclusively run as apache:apache, and I'm assuming PHP uses that configuration as well.  However, any of the PHP modules might be running as some other user, and I'm unsure of how to check this.  
  > **username_0**: So, an update: Disabling SELinux allowed apache/PHP proper access, which seems to suggest ther MUST be a SEL policy set up. However, this is also weird, because I did set up a policy on storage at one point to no avail. Oh well, since this is a staging server, I'm going to leave SEL disabled. If I have the same issues on Production, I'll investigate further.  If you have any advice @username_1, please let me know. Thanks.  
  > **username_1**: Huh... I've got zero experience with SEL.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-08-19. Score: 1 | Accepted answer
  
  Disabling SELinux worked, but only as a workaround. This particular issue was on a Staging server, so disabling SEL was not a huge issue.
  
  However, I would highly recommend not anyone else do this for a Production environment unless they really know what they're doing in terms of permissions.
  
  Good luck.
  
  
  ---
  
  