[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] File download restrictions not working after upgrade



Hi David,

Thanks, that did the trick!

For anyone reading the archives that may have the same issue, I regenerated
the static pages (./bin/generate_static/ARCHIVENAME) and restarted Apache.
I'm not sure which one made a difference but at first editing the file had
no effect.

Edward





On Sun, May 29, 2016 at 12:47 PM, David R Newman <drn at ecs.soton.ac.uk>
wrote:

> 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/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20160529/3c7995ad/attachment.html