Answers.Body: <p>Found the answer so I will post it here to help others.  The server /tmp space filled up due to a rogue imagemagick process, so Civimail could not upload new images.  This is a known issue with imagemagick - see for example <a href="https://github.com/ImageMagick/ImageMagick/issues/395" rel="nofollow noreferrer">this post</a>.  Deleting /tmp/magick-* files solved the problem.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-15T21:48:10.150Z
Answers.LastActivityDate: 2018-04-15T21:48:10.150Z
Answers.UserDisplayName: twowheeler
Body: <p>We are getting a "Failed to write file" error popup when attempting to upload an image in civimail using KCfinder.  This worked until about a month ago, and I don't what has changed.  The files in the ~/wordpress/wp-content/plugins/files/civicrm/persist/contribute/images folder are visible in KCfinder, and can be inserted into the email.  When I manually copy new image files into that directory, they appear in KCfinder and can be used.  The permissions on the directory are 775, the images have 644, and the file ownership is correct.  So I don't see anything wrong with any of that. Any ideas?  This is on PHP 7.0.28, WP 4.9.5, Civicrm 4.7.30.  </p>
  
Tags: <wordpress><civimail><kcfinder>
Title: Error trying to upload an image in civimail on wordpress
ThreadText: # Error trying to upload an image in civimail on wordpress
  
  (Asked by: username_0 on 2018-04-14)
  
  We are getting a "Failed to write file" error popup when attempting to upload an image in civimail using KCfinder. This worked until about a month ago, and I don't what has changed. The files in the ~/wordpress/wp-content/plugins/files/civicrm/persist/contribute/images folder are visible in KCfinder, and can be inserted into the email. When I manually copy new image files into that directory, they appear in KCfinder and can be used. The permissions on the directory are 775, the images have 644, and the file ownership is correct. So I don't see anything wrong with any of that. Any ideas? This is on PHP 7.0.28, WP 4.9.5, Civicrm 4.7.30.
  
  **Tags:** wordpress, civimail, kcfinder
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-04-15. Score: 2 | Accepted answer
  
  Found the answer so I will post it here to help others. The server /tmp space filled up due to a rogue imagemagick process, so Civimail could not upload new images. This is a known issue with imagemagick - see for example [this post](https://github.com/ImageMagick/ImageMagick/issues/395). Deleting /tmp/magick-\* files solved the problem.
  
  
  ---
  
  