Body: <p>I'm on Drupal 7 and attempting to upgrade to Civi 5.25. </p>
  
  <p>I followed the steps <a href="https://docs.civicrm.org/sysadmin/en/latest/upgrade/drupal7/" rel="nofollow noreferrer">here</a> to upgrade and now I'm getting this error when attempting to log in as a user on the front end:</p>
  
  <p>"The website encountered an unexpected error. Please try again later." </p>
  
  <p>which I <em>think</em> is caused by this: </p>
  
  <p>"The directory sites/default/files exists but is not writable and could not be made writable."</p>
  
  <p>which I can see in Drupal, which I can get to. I can get to the command line via SSH to modify my settings.</p>
  
  <p>I had to sudo at the command line to do these commands:</p>
  
  <p>"Ensure that your Drupal files directory is writeable by the webserver.</p>
  
  <p>$ cd /sites/default/files</p>
  
  <p>$ chown -R www-data: .</p>
  
  <p>$ find . -type d -exec chmod 0755 {} \;</p>
  
  <p>$ find . -type f -exec chmod 0644 {} \;</p>
  
  <p>$ chmod -R u+rw ."</p>
  
  <p>So I hope and think the fix is a simple one, at the command line. Any help appreciated! </p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-12T19:38:06.047Z
Comments.Text: So I think I fixed the permissions issue, doing this at the command line - sudo chown -R joe-demo:joe-demo /var/www/joe-demo/htdocs  . I had done the same a few months ago with help from Jon Goldberg, and that was in my history. But I don't remember enough to add a good Answer here. Also, this is a good reference https://civicrm.stackexchange.com/questions/168/are-there-recommended-directory-ownership-and-permission-settings-for-civicrm-fi
Comments.UserDisplayName: Joe McLaughlin
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-14T11:16:27.527Z
Comments.Text: I'm a bit lost here!  You had a problem logging in; you found an error message; you ran some commands intended to fix the error message....  So can you log in now?  If so, congrats you appear to have resolved the problem.  If not, what messages are you getting now?  What's the problem you are looking for help with?
Comments.UserDisplayName: Aidan
Tags: <drupal><upgrade><5.25>
Title: "The directory sites/default/files exists but is not writable and could not be made writable." How can I fix this?
ThreadText: # "The directory sites/default/files exists but is not writable and could not be made writable." How can I fix this?
  
  (Asked by: username_0 on 2020-05-12)
  
  I'm on Drupal 7 and attempting to upgrade to Civi 5.25.
  
  I followed the steps [here](https://docs.civicrm.org/sysadmin/en/latest/upgrade/drupal7/) to upgrade and now I'm getting this error when attempting to log in as a user on the front end:
  
  "The website encountered an unexpected error. Please try again later."
  
  which I *think* is caused by this:
  
  "The directory sites/default/files exists but is not writable and could not be made writable."
  
  which I can see in Drupal, which I can get to. I can get to the command line via SSH to modify my settings.
  
  I had to sudo at the command line to do these commands:
  
  "Ensure that your Drupal files directory is writeable by the webserver.
  
  $ cd /sites/default/files
  
  $ chown -R www-data: .
  
  $ find . -type d -exec chmod 0755 {} \;
  
  $ find . -type f -exec chmod 0644 {} \;
  
  $ chmod -R u+rw ."
  
  So I hope and think the fix is a simple one, at the command line. Any help appreciated!
  
  **Tags:** drupal, upgrade, 5.25
  
  > **Comments:**
  > **username_0**: So I think I fixed the permissions issue, doing this at the command line - sudo chown -R joe-demo:joe-demo /var/www/joe-demo/htdocs  . I had done the same a few months ago with help from Jon Goldberg, and that was in my history. But I don't remember enough to add a good Answer here. Also, this is a good reference https://civicrm.stackexchange.com/questions/168/are-there-recommended-directory-ownership-and-permission-settings-for-civicrm-fi  
  > **username_1**: I'm a bit lost here!  You had a problem logging in; you found an error message; you ran some commands intended to fix the error message....  So can you log in now?  If so, congrats you appear to have resolved the problem.  If not, what messages are you getting now?  What's the problem you are looking for help with?  
  
  ---
  
  ## 0 answers
  
  