Thanks a lot for your quick reply Berliner.

I tested the download process as a anonymous user, below mentioned error is seen at the last step after user clicking on file name to download the file.

Access denied
You are not authorized to access this page. 

I also do not see any permission to be set for Anonymous user.

Please suggest some solution(s) to solve this issue,

This issue is follow up of http://drupal.org/node/1140054#comment-4420696

Thanks & Regards,

AnAnD | Drupal | Photographer | Linkedin | Twitter

Comments

Anandyrh’s picture

To be more clear, I have installed the same module in one of my other test server. Unfortunately i am facing the same issue here as well.

I wanted to protect my file but the file is becoming private, so anonymous users are not able to access.

Please help me out.. I love to use this module to be same as shown in example (http://berliner.reflectlife.org/) on all of my websites.

Thanks & Regards,
AnAnD | Drupal | Photographer | Linkedin | Twitter

Anandyrh’s picture

Configurations on my site:

1. Installed the modules (Webform Protected Downloads, Private Upload)

2. Changed 'Default Upload Privacy Setting:' to 'Public' under 'admin/settings/private_upload'

3. Created a Webform > attached a file

4. Under 'File attachments' selected 'Public'

5. Enabled 'Protected' under 'Protected Downloads'.

6. Enabled 'view uploaded files' permission for anonymous users under 'admin/user/permissions'

Thanks & Regards,
AnAnD | Drupal | Photographer | Linkedin | Twitter

berliner’s picture

Would it be possible for you to let me see the test server that you are using? You can send me the url as a private message if you like.

Anandyrh’s picture

Hi Berliner,

Thanks a lot for the quick response, but my site is currently running on a local server not yet gone live... :(

mfb’s picture

Please try the patch on this issue: #1179064: Cached access denied page at system/files/private/... (making sure to clear your cache)

Anandyrh’s picture

Hi mfb,

Thanks a lot sharing the patch. I have updated it. but did not make any difference. Anonymous users are still not able to download the file as it's prompting for login.

Anandyrh’s picture

StatusFileSize
new30.75 KB

Please find attached file I have updated the patch, let me know if I have done anything wrong.

Thanks & Regards,
Anand

johnshih’s picture

I have the same problem. It used to work for me, where anonymous user is able to download the file from a secure link.
However, this time when I uploaded a new file, it only worked for a authentic user. Anonymous user are able to view the page, from the secure link, but after a few seconds it will display 'http 500 internal server error page' for IE and 'access denied page' for firefox.

I've also tried the patch #5, but it didn't work as well.

berliner’s picture

Did you make any other changes to your sites? Any module updates, settings changed in other modules? Anything that can shed light on the fact that it used to work and then stopped?

@ Anandyrh: Did you install and configure Private Upload correctly? Meaning everything under admin/settings/private_upload is green?

johnshih’s picture

Hi Berliner,

I find something interesting.

I changed the new file back to previous file and it worked.
Anonymous user is now able to download the file.

I then changed that old file to a new file name, and it works too.
However, If I changed the file to a new file with the new file name it didn't work.

The only difference between the 2 is the file size.
The old file is 48MB and the new file is 62 MB.

May be that's the problem?

Anandyrh’s picture

StatusFileSize
new37.79 KB

Hi Berliner,

Please find attached screenshot of the Private Upload Status. Let me know if there is something wrong with it.

Thanks & Regards,
Anand

johnshih’s picture

I got it to work.

I've increased the php_value memory_limit to 256M in the .htaccess.

John

(Updates : The problem came back again. However it still work for IE but not other browsers. )

johnshih’s picture

Hi berliner,

Is it possible to download the file through secure link without checking user role?

berliner’s picture

@johnshih: Please open a new issue.

Anonymous’s picture

Hi,

I've installed the modules for D6 as instructed on the module home page, and I am getting access denied for the anonymous user right from the start!

Man, I've had so many problems with webform that I'm one step away from giving up! Thanks for your support
Rich

johnshih’s picture

Hi richH
Did you enabled 'view uploaded files' permission for anonymous users under 'admin/user/permissions'?

btw berliner,
I got this to work again. My problem is something to do with the cache. After I disable my boost (Boost - Static page cache), everything worked. After re-enable it, everything continue to worked just fine except a bit slower. (If I only clear the cached data it didn't work. It'll only worked after I disable and re-enable it. There must be some cache data that is still in my database which will only be cleared when I disable it.)

Anonymous’s picture

Hi -

well that was silly of me! I hadn't enabled the right permissions (how did you know?) and amazingly, with the right permissions it works!

Thanks for your support
Rich

johnshih’s picture

Hi richH,

I read in the other thread that some people had the same issue due to this problem.

Hi berliner,

I found out something interesting, which might clear things up for me.
I did a few more testing for the protected download module.

I found out that I can only download the file on the same browser(IE/Firefox/Chrome etc...) that I registered for it. However, after that browser has access to the page, the next time I registered with another browser I'm still able to access the download file.

My guess was because there is cache in the browser that gave the anonymous user access to the protected download file?! I'm not sure if I was correct about it and I'll try to investigate this further.

Anandyrh’s picture

Hi Johnshih,
This sounds strange to me :) I was thinking to use this module for my upcoming project. Please let me know post your investigation.

graytoby’s picture

Version: 6.x-1.0-rc3 » 7.x-1.x-dev

I have the same issue in Drupal 7. I also use boost. And I also noticed, that changing browsers gives a nice Access Denied page, except Internet Explorer. IE seems to work just fine. Clearing caches doesn't help. I was using cookies for tracking submissions, so I thought that caused problems when switching browsers, but even after disabling it, the issue still exist.

sillygwailo’s picture

Title: Webform protected downloads dose not work for anonymous users » Webform protected downloads does not work for anonymous users
berliner’s picture

Any progress on this? I'm still not able to reproduce this issue.

Anandyrh’s picture

I did not go forward with this module

berliner’s picture

http://drupal.org/node/1747898 made me think of another explanation why some people are having problems using this module.
Could you check if any of the installed contrib modules implements hook_file_download?

One way of doing this (on linux or mac) is to open the terminal, cd to sites/all/modules or wherever your contrib modules are installed and then issuing the command grep -r "_file_download" * or just do a project wide search for "_file_download".

johnshih’s picture

Hi berliner,

None of my contrib modules implements hook_file_download.

ZenLax’s picture

Category: support » bug

Subscribe. Protected Downloads was working great. Then I started getting the Access Denied message after 2 changes:

1) I modified the file and was getting ready to upload a new version, but accidentally deleted it first via FTP before removing from the node. Then removed the node entry and uploaded a new version of the file (which had the same file name).

2) Prior to the above change, I implemented Boost and Boost Crawler the day before. Revisioning and the Diff module are implemented for this webform content type.

Clearing cache has no affect on the problem, nor does removing previous revisions.

ZenLax’s picture

Status: Active » Closed (works as designed)

My bad, sorry for the alert - too little time and not enough sleep. Problem was a simple permissions issue for file downloads.

berliner’s picture

Status: Closed (works as designed) » Active

Reopening this as the issue is not solved yet.

Glad to hear that it's working for you though.

berliner’s picture

Category: Bug report » Support request
Issue summary: View changes
Status: Active » Closed (cannot reproduce)

Closing this old issue. It has not been possible to reproduce the described problems and the information flow has been weak.
If anybody encounters similar problems, please open a new issue.