When I have the Drupal file download method set to "private," filefield seems to work, but trying to download the file itself results in an "access denied" error unless I am logged in as the uid=1 user.

I found an old issue about getting filefield to work with private download, but it looks like a patch was committed a long time ago:
http://drupal.org/node/113900

Maybe a patch was only applied for version 6?

Is there some access control setting I am missing? I scoured the access control page and found nothing for enabling file downloads.

I did recently switch from public to private download method, but this happens for newly uploaded files as well as old ones.

Basically what I want is for the file to be downloadable only if the user has access to the node... Any help would be appreciated.

Comments

xjm’s picture

For the record, all users (anonymous, authenticated, etc.) currently have "view filefield uploads" permissions enabled.

drewish’s picture

do you have the upload module enabled? if so do these users have view uploaded files permissions? there's a bug in core that has the upload module blocking other modules from weighing in on file permissions.

drewish’s picture

Status: Active » Fixed
xjm’s picture

Thank you! Enabling the upload module and granting upload permissions resolved the issue and now files are visible--or not--depending on what node they belong to.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.