EPrints Technical Mailing List Archive
Message: #05752
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] File download restrictions not working after upgrade
- To: eprints-tech@ecs.soton.ac.uk
- Subject: Re: [EP-tech] File download restrictions not working after upgrade
- From: "Edward M. Corrado" <ecorrado@ecorrado.us>
- Date: Sun, 29 May 2016 13:13:49 -0500
Hi Edward,
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.
Regards
David Newman
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?
Edward
*** 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/
*** 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/
- References:
- [EP-tech] File download restrictions not working after upgrade
- From: "Edward M. Corrado" <ecorrado@ecorrado.us>
- Re: [EP-tech] File download restrictions not working after upgrade
- From: David R Newman <drn@ecs.soton.ac.uk>
- [EP-tech] File download restrictions not working after upgrade
- Prev by Date: Re: [EP-tech] File download restrictions not working after upgrade
- Next by Date: [EP-tech] /eprints/ page mechanism
- Previous by thread: Re: [EP-tech] File download restrictions not working after upgrade
- Next by thread: [EP-tech] /eprints/ page mechanism
- Index(es):