I am experimenting with private file system, done custom way :) .
There is file system/files/test.txt (That is, private://test.txt).
When I try to access the file, I get access denied from Drupal, as expected (site redirects to Access denied page, and dblog shows that accesss have been denied).
But now I want to know what module/function have blocked access to the file. I am blindly trying to check hook_file_download or hook_file_download_access, but as far as I can see it does not go through that functions.
All that in attempt to solve this.