[EP-tech] File download restrictions not working after upgrade
David R Newman
drn at ecs.soton.ac.uk
Sun May 29 18:47:59 BST 2016
This will be an issue due to you using Apache 2.4 rather than Apachee
2.2 or earlier. To resolve this you need to is find the line that sets
the variable $ip in security.pl and change it to:
my $version = Apache2::ServerUtil::get_server_version();
$version =~ /^Apache\/([0-9]+\.[0-9]+)/;
my $ip = $1 >= 2.4 ? $r->useragent_ip : $r->connection()->remote_ip();
If you do not use whitelisting of IP addresses, (e.g. if you can access
files when you are on site but you want to restrict access to people
offsite) then it is probably better to just comment out the line that
that set $ip altogether.
On 29/05/2016 18:34, Edward M. Corrado wrote:
> I upgraded an old eprints server from 3.1 to the EPrints 3.3.15.
> I also migrated it to a new server running Ubuntu 14.04 LTS
> with new hostname and server ip at the same time.
> Everything seems to be working well except that file download
> restrictions do not have any effect. Someone who is not logged in can
> download any file, even if it is is marked "Restricted to Registered
> users only" or "Restricted to Repository Staff Only."
> Permissions on logging in and editing files seem to work.
> I also tried changing the restrictions on files to see if that would
> do anything but it doesn't seem to.
> Does anyone have any ideas on what to do?
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/
> *** EPrints developers Forum: http://forum.eprints.org/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Eprints-tech