Hello,
I manage a website that's running Drupal 6.25. I have two different types of files that I need to be "protected". One is just a folder containing PDFs, the other is a folder containing folders of digital newspapers (flash/html5).
Last week I used the tutorials online (not this module - tho they are practically the same thing) and got the digital newspapers area "protected". However, it somehow was messing up the flash and it wouldn't work in Safari or IE8. So I reverted it back, deleted all custom htaccess', removed the custom module, and cleaned out any references manually in sql.
So now I want to try the same thing for the PDF folder. And it just does not work...
Standard settings.... (sites/default/files/private) containing the stock htaccess file. Install went fine, setup went fine (sans the ckeditor nonsense), permissions set, all is well. But it just does not work. I've clear caches in drupal, rebooted apache, cleared browsers caches, etc. Nada.
In the (sites/default/files/private) folder I have an image, logo.jpg, and when I make ANY kind of call to it I get 'Access Denied'.
(www.url.com/system/files/private/logo.jpg) -> (www.url.com/system/files/private/logo.jpg) - 'Access Denied'
(www.url.com/sites/default/files/private/logo.jpg) -> (www.url.com/system/files/private/logo.jpg) -'Access Denied'
(www.url.com/files/private/logo.jpg) -> (www.url.com/files/private/logo.jpg) -'Access Denied'
I have no modules that even come close to effecting the hook going on here. I'm at a complete loss. And I've been working on this for 2 SOLID days now.
Thanks,
Chad
Comments
Comment #1
croush CreditAttribution: croush commentedJust an update,
I installed this module on our other drupal site (same server...same apache/sql) and it works. However, it downloads all files, even images, instead of displaying them in the browser. And I know it's module related and not apache because I can go to a misc image folders (not private) and they are displayed just fine in the browser.
I looked into the module at the headers area and I see nothing wrong... It even has the max-age set which was not present in the tutorials I used last week.
Edit: I switched the content-dispo to inline and it works. And that's fine because everything we are serving we want that way.
The main .htaccess file for the site that isn't working...
Comment #2
croush CreditAttribution: croush commentedBecause my .htaccess file for the main site is rather customized, and the site that private download is working on isn't, I switched them to see what happens. Still nothing. Rewrites work but all I get is 'Access Denied' errors, even with the super user.
Flushed all caches, rebuilt all permissions, rebooted apache, flushed browsers, tried 5 diff browsers, nothing.
Comment #3
croush CreditAttribution: croush commentedWell I figured this out after 2+ solid days of hair pulling and teeth grinding.
One word, CKEditor. That's right, I have no idea what it was doing but I turned it off and it worked. Actually, it even fixed what wasn't working last week.
All I did was update to the newest CKeditor (which just came out) and everything is fine.
Chad
Comment #4
johnhanley CreditAttribution: johnhanley commentedHi Chad,
Sorry, I was at DrupalCon all last week and am just now catching up on everything.
Yeah, WYSIWYG editors wreak havoc when editing plain text. You'll want to either disable it for the .htaccess field or add an exception in the WYSIWYG settings to suppress it entirely.
Anyway, I'm glad you figured it out.
John
Comment #5
johnhanley CreditAttribution: johnhanley commentedComment #6
aangel CreditAttribution: aangel commentedWow, you just saved me loads of trouble. THANK YOU for posting your solution about CKEditor. The module wasn't working for me, either, and I had run out of places to look. I saw this issue, followed it to the end and voilà, problem solved. I turned off CKEditor and the module now works!!
Going to upgrade CKEditor now and if I don't post again, the problem is resolved.
Comment #7
msathesh CreditAttribution: msathesh commentedThanks for the module. I wasn't able to make my code work (followed from the blog post anyway). It didn't work until I disabled mine. Thanks once again.