1

I'm trying to keep all files on a D8 site in the private filesystem so that I can rely on Drupal to deal with the permissions. The problem is, it seems like when an image is in the Private filesystem, it's derivatives (image styles) don't get created. The original image is available (at system/files//, and rightfully NOT available to those without permission (for instance, anon can see it if it's published, but can't get to the file at it's URI if I unpublish that node.)

  • Apache has full read/write access to the private directory (which I have one level up from the Drupal root directory), as should hopefully be evidenced by being able to put the raw image file in.
  • When I switch to public filesystem, it works, so (in addition to having checked all the permissions for /tmp and even trying alternative tmp folders) I don't think it's a /tmp directory issue
  • I'm using the media module, so also the file_entity module
  • This was working at some point, but a Drupal update seems to have broke it (or, at least, it was good timing.) This is my own personal project, so it was some time ago and I'm only now getting around to trying to fix it.
  • I've attempted in on multiple sites on the same server, and they both do it.
    • Both were Drupal 8, and I tried with both PHP 7 and 5.6
  • This is likely caused by a known bug in Drupal: drupal.org/node/2528214. For now the workaround should be to disable "Restrict images to this site" for your text format(s). If you feel adventurous, try out the patch and tell the guys in the issue queue whether it worked or not :) – Neograph734 Jun 25 '17 at 23:48
  • If there was something in my description misleading about the fact that the derivatives aren't being created at all, not just displayed, I'm sorry. But I also said nothing about text formats/editors. This is any image field. – UnsettlingTrend Jun 26 '17 at 0:00
  • Please note that the userbase of this site is quite diverse and the knowledge levels of users vary quite a lot. We have seen bug reports here in the past and I happened to know this bug, which I felt matched your description. Since this an image field it is likely not the case though. Aplolgies and vote retracted. – Neograph734 Jun 26 '17 at 0:05
  • No worries. And sorry if I was a bit short. The lack of activity on this site sometimes can just be frustrating, and having the first person vote to close was even more so. My apologies as well! – UnsettlingTrend Jun 26 '17 at 0:07
  • Apologie accepted :). Be aware though that this still may be considered to be a bug (one I am not aware of) by other users here. Have you searched core and media issue queues already? – Neograph734 Jun 26 '17 at 0:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.