Body: <p>The setting of file/directory permissions for standard drupal is pretty well known and the kinks are worked out.</p>
  <p>On the other hand, I have never been able to figure out the golden steps to take to make my Civi install work perfectly the first time.</p>
  <p>I normally make an attempt, do the composer require, fix up a few more perms, try to enable and watch it fail, then go fix up a few more perms and re-enable.</p>
  <p>I always eventually get there but there is always way too much trial and error.</p>
  <p>does anyone have the steps nailed?</p>
  <p>I've done something like this after my base drupal install prior to requiring and enabling Civi...</p>
  <pre><code>sudo su
  root3=&quot;/var/www/d9_reco&quot; 
  echo $root3
  
  cd $root3 
  mkdir -p ./web/sites/default/files/civicrm 
  mkdir web/libraries 
  sudo chown -R &lt;me&gt;:www-data . 
  sudo find . -type d -exec chmod u=rwx,g=rx,o= '{}' \; 
  sudo find . -type f -exec chmod u=rw,g=r,o= '{}' \;
  
  sudo chmod -R g+w web/core/lib/Drupal/Component/ 
  sudo chmod -R g+w web/sites/default/files 
  sudo chmod g+w web/sites/default  # for civi, undo this after civi install
  sudo find ./web/sites/default/files/civicrm -type d -exec chmod u=rwx,g=rx,o= '{}' \;  # for civi 
  sudo chmod g+w web/libraries # for civi
  </code></pre>
  <p>Sorry, can't seem to get the formatting of that block correct.  It is totally ignoring my line breaks and joining lines???  Ah, I think I got it.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-15T19:22:15.553Z
Comments.Text: Curious about why you have one for `web/core/lib/Drupal/Component`? I don't think you'd want that writable by the web server. Otherwise given what appears to be your hosting setup this doesn't seem too bad.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-16T15:09:50.197Z
Comments.Text: @Demerit I've done so may trial and error attempts that at one point it must have thrown me an error on the Component directory.  I'll try to remove that and see if it was a one-off type of thing.
Comments.UserDisplayName: HeneryH
Tags: <drupal><civicrm.settings.php>
Title: File permissions for installng and enabling Civi Drupal
ThreadText: # File permissions for installng and enabling Civi Drupal
  
  (Asked by: username_0 on 2020-10-15)
  
  The setting of file/directory permissions for standard drupal is pretty well known and the kinks are worked out.
  On the other hand, I have never been able to figure out the golden steps to take to make my Civi install work perfectly the first time.
  I normally make an attempt, do the composer require, fix up a few more perms, try to enable and watch it fail, then go fix up a few more perms and re-enable.
  I always eventually get there but there is always way too much trial and error.
  does anyone have the steps nailed?
  I've done something like this after my base drupal install prior to requiring and enabling Civi...
  sudo su
  root3="/var/www/d9_reco" 
  echo $root3
  
  cd $root3 
  mkdir -p ./web/sites/default/files/civicrm 
  mkdir web/libraries 
  sudo chown -R :www-data . 
  sudo find . -type d -exec chmod u=rwx,g=rx,o= '{}' \; 
  sudo find . -type f -exec chmod u=rw,g=r,o= '{}' \;
  
  sudo chmod -R g+w web/core/lib/Drupal/Component/ 
  sudo chmod -R g+w web/sites/default/files 
  sudo chmod g+w web/sites/default  # for civi, undo this after civi install
  sudo find ./web/sites/default/files/civicrm -type d -exec chmod u=rwx,g=rx,o= '{}' \;  # for civi 
  sudo chmod g+w web/libraries # for civi
  
  Sorry, can't seem to get the formatting of that block correct.  It is totally ignoring my line breaks and joining lines???  Ah, I think I got it.
  
  **Tags:** drupal, civicrm.settings.php
  
  > **Comments:**
  > **username_1**: Curious about why you have one for `web/core/lib/Drupal/Component`? I don't think you'd want that writable by the web server. Otherwise given what appears to be your hosting setup this doesn't seem too bad.  
  > **username_0**: @username_1 I've done so may trial and error attempts that at one point it must have thrown me an error on the Component directory.  I'll try to remove that and see if it was a one-off type of thing.  
  
  ---
  
  ## 0 answers
  
  