Drupal 7 CKEditor Warning: failed to open stream: Permission denied Error

November 3rd, 2016  | Categories: Drupal, Drupal 7, Linux

PROBLEM
The content editor complained of strange errors on the Drupal 7 site we have when he went to upload an image. To follow the steps, he went to a page and clicked Edit then went into the CKEditor. He clicked on the Image icon to upload an image. He already had the image on the website so he chose “Browse Server” under the “Image Info” tab.

First, some of the images didn’t come up as thumbnails; which seemed fine. He double clicked on the image that he wanted and clicked “OK” to insert it onto the page.

He then saved the page and at the top of the page there were errors like these:

  • Warning: imagejpeg(/sites/default/files/_thumbs/Images/ANMI-FPO.jpg): failed to open stream: Permission denied in CKFinder_Connector_CommandHandler_Thumbnail::createThumb() (line 260 of …path…/sites/all/modules/ckeditor/ckfinder/core/connector/php/php5/CommandHandler/Thumbnail.php).
  • Warning: filesize(): stat failed for …path…/sites/default/files/_thumbs/Images/ANMI-FPO.jpg in CKFinder_Connector_CommandHandler_Thumbnail->sendResponse() (line 91 of …path…/sites/all/modules/ckeditor/ckfinder/core/connector/php/php5/CommandHandler/Thumbnail.php).
  • Warning: getimagesize(…path…/sites/default/files/_thumbs/Images/ANMI-FPO.jpg): failed to open stream: No such file or directory in CKFinder_Connector_CommandHandler_Thumbnail->sendResponse() (line 92 of …path…/sites/all/modules/ckeditor/ckfinder/core/connector/php/php5/CommandHandler/Thumbnail.php).
  • Warning: filemtime(): stat failed for …path…/sites/default/files/_thumbs/Images/ANMI-FPO.jpg in CKFinder_Connector_CommandHandler_Thumbnail->sendResponse() (line 96 of …path…/sites/all/modules/ckeditor/ckfinder/core/connector/php/php5/CommandHandler/Thumbnail.php).
  • Warning: imagejpeg(…path…/sites/default/files/_thumbs/Images/candi_face2.jpg): failed to open stream: Permission denied in CKFinder_Connector_CommandHandler_Thumbnail::createThumb() (line 260 of …path…/sites/all/modules/ckeditor/ckfinder/core/connector/php/php5/CommandHandler/Thumbnail.php).
  • Warning: filesize(): stat failed for …path…/sites/default/files/_thumbs/Images/candi_face2.jpg in CKFinder_Connector_CommandHandler_Thumbnail->sendResponse() (line 91 of …path…/sites/all/modules/ckeditor/ckfinder/core/connector/php/php5/CommandHandler/Thumbnail.php).
  • Warning: getimagesize(…path…/sites/default/files/_thumbs/Images/candi_face2.jpg): failed to open stream: No such file or directory in CKFinder_Connector_CommandHandler_Thumbnail->sendResponse() (line 92 of …path…/sites/all/modules/ckeditor/ckfinder/core/connector/php/php5/CommandHandler/Thumbnail.php).
  • Warning: filemtime(): stat failed for …path…/sites/default/files/_thumbs/Images/candi_face2.jpg in CKFinder_Connector_CommandHandler_Thumbnail->sendResponse() (line 96 of …path…/sites/all/modules/ckeditor/ckfinder/core/connector/php/php5/CommandHandler/Thumbnail.php).

SOLUTION
Google was almost no help since those errors are like PHP and not Drupal or CKEditor/CKFinder. However I did stumble upon this forum on CKEditor. The last post said that the Images directory was images in the configuration.

As a shot in the dark I decided to rename the Images folder to images under the _thumbs directory. So here were steps in the Linux/Unix Putty shell:

$ cd ..path../htdocs/sites/default/files/_thumbs
$ ls
Images

$ mv Images images
$ ls

images

That seemed to have worked. The errors no longer appear and when you go into “Browse Server” in CKEditor/CKFinder you actually see the thumbnail images.

No comments yet.

TOP