In Confluence 5.4 were currently facing following Problem:
If a user clicks on a link to an attachment
e.g. https://<confluence>/download/attachments/145917235/Office%202010%20wiki%20test.xlsx
residing in a space that has not enabled view to Anonymous
and is not yet logged in into Confluence.
Then the user is redirected to the Login page and later on
redirected to a 'Not permitted' error page!
with the link: https://<confluence>/notpermitted.action
If the user is already logged in to Confluence before or the Attachment resides in a space that has anonymous view enabled the download starts as expected!
How can the configuration be changed, so that after the login the download starts?