Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I installed this module but it's not working. I have uploaded a zip file to the /private folder and only the users assigned the teacher role are allowed to download this zip file. But users with Teacher role are not able to download the zip files. It says "Access Denied".
Comments
Comment #1
katy5289 CreditAttribution: katy5289 commentedComment #2
johnhanley CreditAttribution: johnhanley commentedI don't know what to tell you. The module works as described when configured correctly. Double-check your setup. Check the other issues in this project for additional tips.
Comment #3
katy5289 CreditAttribution: katy5289 commentedComment #4
katy5289 CreditAttribution: katy5289 commentedWhat do you mean when configured correctly? There's no readme.txt or any documentation with this module. I set the permissions for the teacher role to download the zip file in the private folder and it DOES NOT WORK for users assigned the teacher role. However, when I'm logged in as Super User, I can download the files properly.
Comment #5
johnhanley CreditAttribution: johnhanley commentedTrust me, this is not a bug. Check out my comment in this thread for some configuration tips:
http://drupal.org/node/906624#comment-3428520
Honestly, that's all there is to it.
Comment #6
kbk CreditAttribution: kbk commentedkaty5289 - I've placed some basic documentation here: #967160: How to setup Private Download and use with CCK FileField. Please suggest changes (or contribute your own documentation!) once you figure out what is going on.
Also, have you tried clearing Drupal's cache folders (admin/settings/performance)?
Also, check permissions related to the upload/filefield modules and fields for the teacher role?
Comment #7
webkenny CreditAttribution: webkenny commentedThere must be something amiss here because this module doesn't seem to work for the role I've allowed access to. I've tried every permutation I can think of at this point. The only user in the site who can successfully download a file with this module on is User 1. Reviewing the code, everything looks normal though.
Are there any known conflicts between this module and others that could be causing this problem? The only access module I have enabled is "Content Access" which should have no bearing whatsoever on uploaded files. I even disabled that module to be sure it wasn't somehow conflicting.
To be clear, this is the road I've tried:
This is just using straight FTP uploads. No Filefield involvement here. I've updated as well to 1.2.
Comment #8
johnhanley CreditAttribution: johnhanley commentedIt's gotta be something to do with your particular configuration because if this problem was so widespread everybody would be complaining and nobody would be using Private Download successfully.
The fact that only user #1 can download a file suggests to me that another module is overriding the permission provided by Private Download. Try temporarily disabling Content Access and then see if it works.
Comment #9
webkenny CreditAttribution: webkenny commentedIndeed it appears the Gallery Assist module for some unexplained reason in an old version (1.11) was passing -1 further up the chain than Private Download. Sorry for the unintended fire alarm, there.
Might make for an interesting patch if Private Download was in debug mode and could report on something preventing it from executing. Imagine the fewer issues you'd get in queue.
Nice work on this. Very easy to work with when something else isn't standing in it's way. ;)
Comment #10
johnhanley CreditAttribution: johnhanley commentedThat's good news, Kenny.
You're right, the permissions issues does crop up from time to time. I do wonder if there's a way to determine if another module is muscling in on Private Download's permission.
Comment #11
wsitch CreditAttribution: wsitch commentedI can't believe it. I've been banging my head against this for TWO days. I had the same problem as webkenny. User #1 can download a private file, others can't regardless of permissions. I've cleared caches, rebuilt permissions, removed/added FileField Permissions, Content Access, ACL, etc etc etc. No dice.
I just figured it out. There's a module out there called "Backup and Migrate". If the user has permissions to "access backup files", then they can download a private file if the other permissions line up. Otherwise they can't. Grrr.
Heads up, don't just be wary of Gallery Assist, watch out for this stupid "Backup and Migrate" module too!
Comment #12
wsitch CreditAttribution: wsitch commentedThis was also causing me to (falsely) believe that if I had CCK FileField "Content Permissions" module enabled, I was unable to simply FTP files into the private directory and download them blind.
I had convinced myself I was going to have to use the new CCK content type (with new private CCK file field attached) to upload files one at a time.
The $denied == TRUE being set by Backup and Migrate was killing me on so many different levels.
Comment #13
johnhanley CreditAttribution: johnhanley commented@wsitch,
Thanks for your posts. I wasn't aware Backup and Migrate could wreak such havoc with access permissions either. Ironically I just downloaded Backup and Migrate a few minutes ago, but thankfully the intended project doesn't also use Private Download. :-)
Anyway, hopefully this information will save others some time.
John
Comment #14
webkenny CreditAttribution: webkenny commentedBM,
If you don't mind I am going to try my hand at some form of a notification that might help folks identify which modules could be affecting their ability to use this module. e.g. a debug mode. As far as I'm concerned this is one of the more useful ones in the community so I'm willing to assist. I'll see what I can do in the way of a patch here in the next couple of weeks.
We'll look at it and see if maybe it's something to be included in a future release.
-K
Comment #15
webkenny CreditAttribution: webkenny commentedCategorizing this properly.
Comment #16
johnhanley CreditAttribution: johnhanley commentedwebkenny, that would be awesome!
I'm looking forward to hearing your findings.
John
Comment #17
ikeigenwijs CreditAttribution: ikeigenwijs commentedi also have some problems see issue.
i removed backup migrate, but this did not help.
http://drupal.org/node/1024406
Comment #18
anrikun CreditAttribution: anrikun commentedPlease check #1389810: Does not implement hook_file_download the right way and hijacks path system/files and review the patch. Does it fix your issues?
Comment #19
johnhanley CreditAttribution: johnhanley commentedClosing due to Drupal 6 end-of-life cycle.