I'm trying to setup a private folder for part of the files I need to make available in my Drupal 8 install and I'm having some trouble.
My public files are being served with no problem in sites/default/files
. In this path, I also have a private
folder (sites/default/files/private
), which correctly shows up in Config -> media (not in red).
I have setup the .htaccess file for the public files
root as indicated here for Drupal 7, and in the private
root the same, but adding Deny from all
at the bottom.
Now when I try to create some content with a file field that is set to private, is says that the file could not be uploaded and the message log shows:
The upload directory private://2016-06 for the file field field_myfieldname could not be created or is not accessible. A newly uploaded file could not be saved in this directory as a consequence, and the upload was canceled.
But the 2016-06
directory is showing up, although empty.
Can anyone shed some light on why this is happening and how to fix it?