Answers.Body: <p>Changing the <code>userphotos</code> folder's owner to be the same as the user:group Apache was running as solved the issue.  i.e.</p>
  
  <pre><code>chown -R www-data:www-data userphotos
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-13T17:48:09.740Z
Answers.LastActivityDate: 2016-10-13T17:48:09.740Z
Answers.UserDisplayName: Brad Bell
Body: <p>On my production server, each time I try to change or upload a user photo I get the "an unknown error occurred" message. If I check the logs, the error says it couldn't delete the folder of the userphotos because it is not writable.</p>
  
  <p>Now I checked the settings and everything is set to 755, the same as the assets folder where I have no problems uploading. The only way I got the userphotos to work is to set the permission on the folder to 777, but that's not the best solution security-wise.</p>
  
  <p>So why isn't the userphotos folder writeable but the assets folder is?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-09-29T17:05:08.100Z
Comments.Text: What user:group owns the `userphotos` folder and what user:group is your web server running as?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-10-12T09:50:04.570Z
Comments.Text: `userphotos` folder owned by `clientname:clientname` and webserver as `'www-data:www-data`
Comments.UserDisplayName: Jan Van Echelpoel
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-10-12T18:25:00.110Z
Comments.Text: `chown -R www-data:www-data userphotos`?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-10-13T11:32:19.097Z
Comments.Text: Yeah that did the trick. Thanks for helping out. :-)
Comments.UserDisplayName: Jan Van Echelpoel
Tags: <error><permissions>
Title: permissions userphotos "an unknown error occurred"
ThreadText: # permissions userphotos "an unknown error occurred"
  
  (Asked by: username_0 on 2016-09-29)
  
  On my production server, each time I try to change or upload a user photo I get the "an unknown error occurred" message. If I check the logs, the error says it couldn't delete the folder of the userphotos because it is not writable.
  
  Now I checked the settings and everything is set to 755, the same as the assets folder where I have no problems uploading. The only way I got the userphotos to work is to set the permission on the folder to 777, but that's not the best solution security-wise.
  
  So why isn't the userphotos folder writeable but the assets folder is?
  
  **Tags:** error, permissions
  
  > **Comments:**
  > **username_1**: What user:group owns the `userphotos` folder and what user:group is your web server running as?  
  > **username_0**: `userphotos` folder owned by `clientname:clientname` and webserver as `'www-data:www-data`  
  > **username_1**: `chown -R www-data:www-data userphotos`?  
  > **username_0**: Yeah that did the trick. Thanks for helping out. :-)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-10-13. Score: 0 | Accepted answer
  
  Changing the `userphotos` folder's owner to be the same as the user:group Apache was running as solved the issue. i.e.
  
  ```
  chown -R www-data:www-data userphotos
  
  ```
  
  
  ---
  
  