The problem is with the image cache in the directory "/sites/default/files/internal/styles/".
I have a problem in Drupal 7 with access to private images.
There should be articles with images on our website. Some articles (including images) should be public, some articles (including images) should be accessible only to registered users.
As default download method I use "private local files served by Drupal" and I use module "Content Access" to define access rights for articles. My directory for "private" files is called "internal", so images are stored in "/sites/default/files/internal".
Everything seems to work OK, i.e. image "someimage.jpg" is not accessible (by a web browser) via URL "/sites/default/files/internal/someimage.jpg" and authorized users (defined by access rights for related article) can see this image via "/system/files/someimage.jpg".
The problem is with the image cache in the directory "/sites/default/files/internal/styles/". The thumbnail stored at "/sites/default/files/internal/styles/thumbnail/private/someimage.jpg" is (correctly) unaccessible by a web browser.
This thumbnail is unfortunatelly publicly accessible via
/system/files/styles/thumbnail/private/someimage.jpg
and even by
/sites/default/files/styles/thumbnail/private/someimage.jpg
(I must stress both paths do not exist in the filesystem, they are generated by Drupal).
I tried to found some information on this behaviour of Drupal but I failed.
Can anybody help me how to solve this problem?
Thanks.