Forum OpenACS Q&A: download.tcl won't allow downloads from unregistered users?

I'm using new-file-storage in OpenACS 3.2.5.

download.tcl works great (now that I've added some
additional mime-types) for registered users.  However, I'm finding
that I get redirected to registration any time I try to download files
while not logged in.  I commented out the
ad_maybe_redirect_for_registration, but I'm still getting redirection.
(I checked, and I do have permissions for reading set for all_users
in the permissions table.)

I'd appreciate a clue, if anyone has one handy.

p.s. I have in the logs: "Error: Filter fs_file_downloader returned
error #1: unknown severity "Filter":  should be one of:... "  But I
get this same error message (as described in the bug reports)
regardless of whether or not I'm logged in, so whatever this is, it
isn't preventing downloads for logged-in users.

Collapse
2: I answer my own question. (response to 1)
Posted by Cathy Sarisky on
Ok, it never fails.  Give up, post your silly newbie questions, and then discover the answer.  For anyone who might be interested, it appears that the proc fs_file_downloader (in tcl/new-file-storage-defs.tcl) does an ad_maybe_redirect_for_registration.  I've commented this line out, and now unregistered users can download files.

Having ad_maybe_redirect_for_registration probably saves you some time if you don't ever want unregistered users downloading files, but it prevents files from being readable by tourists, regardless of permission settings.  (It appears that fs_file_downloader is checking permissions, so I don't think I've opened a hole in the process.)

Checking permissions is cleaner, i.e. if you don't want a file to be downloadable by "unregistered tourists" restrict the perms to registered users.