[dspace-tech] Re: Removing access to private items for non-registered users and bots

2017-02-19 Thread Patricio Marrone
This was the SQL script I used to change the READ permissions from the 
Anonymous groups to Administrator of all items marked as private 
(discoverable = false), including all bundles and bitstreams associated 
with them. I guess I could have just removed them, but I wanted to be able 
to quickly revert this change if necessary.
 

> UPDATE resourcepolicy SET
> epersongroup_id = 1,
> rpname = 'Restricted Access'  
> where policy_id in (
>  SELECT policy_id FROM item i
>  join item2bundle i2b on i.item_id = i2b.item_id
>  join bundle2bitstream b2b on i2b.bundle_id = b2b.bundle_id
>  join resourcepolicy rp on 
>  b2b.bitstream_id = rp.resource_id and resource_type_id = 0 OR
>  i2b.bundle_id = rp.resource_id and resource_type_id = 1 OR
>  i.item_id = rp.resource_id and resource_type_id = 2
>  where i.discoverable = false
>  and epersongroup_id = 0
>  and action_id = 0 
> );



El martes, 14 de febrero de 2017, 11:12:01 (UTC-3), Patricio Marrone 
escribió:
>
> Just for clarifying, this is a DSpace 5 instance.
>
>
> El martes, 14 de febrero de 2017, 11:00:24 (UTC-3), Patricio Marrone 
> escribió:
>>
>> Hi all!
>>
>> We have a DSpace instance where admins have been marking elements as 
>> private, expecting to protect them from unauthorized access. As far as I 
>> understand, private items only marks them as non-discoverable, but makes 
>> them accessible for anyone who has the item's link. This seems to include 
>> Google crawlers and the like, which in this case is a problem.
>>
>> What I understand that needs to be done here is to find all items which 
>> are marked as private and remove Anonymous read access (and add 
>> Administrator ADMIN access, correct?). The advanced authorization 
>> management page only seems to deal with collections, so I guess that I 
>> should change this directly from the database.
>>
>> If anyone has some advice about this, it would be appreciated.
>>
>> I see some useful SQL scripts by Ivan Masár to get the policies for 
>> bitstreams and items in 
>> https://groups.google.com/d/msg/dspace-tech/WyMQkP-xmhk/PQ7tyl4EBwAJ
>>
>> So for bitstreams:
>>>
>>> SELECT * FROM resourcepolicy WHERE resource_type_id = '0'
>>>
>>>
>>> and for items (with item handle added):
>>>
>>> SELECT handle.handle, resourcepolicy.*FROM resourcepolicy, handleWHERE 
>>> resourcepolicy.resource_type_id = '2'AND resourcepolicy.resource_id = 
>>> handle.resource_id
>>>
>>>
>>>  
>> And also this script from Peter Dietz to change access for Tiff 
>> bitsreams, which seems close to what I am looking for (from 
>> https://groups.google.com/d/msg/dspace-tech/gtlwKOaXoGc/Jegq67nABgAJ)
>>
>> You could write a SQL query to change the eperson_group with access from 
>>> 0 to 1. (From anonymous to administrator group).
>>> The SELECT query to see what data your looking at:
>>> SELECT 
>>>   bitstream.bitstream_id, 
>>>   bitstream."name", 
>>>   bitstreamformatregistry.short_description, 
>>>   resourcepolicy.policy_id, 
>>>   resourcepolicy.action_id, 
>>>   resourcepolicy.eperson_id, 
>>>   resourcepolicy.epersongroup_id
>>> FROM 
>>>   public.bitstreamformatregistry, 
>>>   public.bitstream, 
>>>   public.resourcepolicy
>>> WHERE 
>>>   bitstream.bitstream_format_id = 
>>> bitstreamformatregistry.bitstream_format_id AND
>>>   resourcepolicy.resource_id = bitstream.bitstream_id AND
>>>   bitstreamformatregistry.short_description = 'TIFF';
>>>
>>>
>>> And the update query, that will actually change things.
>>> UPDATE
>>>   resourcepolicy
>>> SET
>>>   epersongroup_id=1
>>> WHERE
>>> (policy_id IN(
>>> SELECT 
>>>   resourcepolicy.policy_id
>>> FROM 
>>>   public.bitstreamformatregistry, 
>>>   public.bitstream, 
>>>   public.resourcepolicy
>>> WHERE 
>>>   bitstream.bitstream_format_id = 
>>> bitstreamformatregistry.bitstream_format_id AND
>>>   resourcepolicy.resource_id = bitstream.bitstream_id AND
>>>   bitstreamformatregistry.short_description = 'TIFF'
>>> ));
>>>
>>
>>
>> I'll try to derive a script for updating private items to Admin-only from 
>> these posts. It would be helpful to know if someone has a better way to do 
>> this or has already done this before.
>>
>> Thanks,
>>
>> - Patricio Marrone
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] Re: Dspace 5.5 - How to extract from dspace log the event of downloaded bitstreams

2017-02-19 Thread Donald Bynum
Look in dspace\exports\log\solr.log  That is where the solr queries are 
replicated.  You can run a search or download a bitstream and then grab the 
corresponding solr query from the log and then modify to meet your own 
purposes.  This along with the pointers from Terry should get you to where 
you need to be.

Best regards,

Don.

On Wednesday, February 15, 2017 at 10:51:24 AM UTC-5, Edmilson José Boregas 
wrote:

> Hi all,
>
>
> I have to produce a ranking of the most downloaded bitstream (Dspace 5.5).
>
>
> At the dspace log file I've found the following messages: 
>
>
> 2017-02-04 00:20:22,663 INFO  org.dspace.usage.LoggerUsageEventListener @ 
> anonymous:session_id=826A711DAFC58FA021873BA5F1D7DDE1:ip_addr=157.55.39.41:view_bitstream:bitstream_id=22895
>
>  
>
> 2017-02-04 00:20:24,737 INFO  org.dspace.app.xmlui.cocoon.BitstreamReader 
> @ 
> anonymous:session_id=9446A033674E101C86BE2CAE2BAA4592:ip_addr=173.252.88.95:view_bitstream:handle=10438/2674,withdrawn=true
>
>  
>
> I ask: 
>
>
> 1. Which of those lines mean that a bitstream was downloaded?  Is there 
> any others?
>
>
> 2. Is there some tool in Dspace 5.5 that can help me to extract this kind 
> of event from dspace log file?
>
>
> Thanks a bunch
>
>
> Ejsboregas
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] vagrant-dspace initial setup log wanted.

2017-02-19 Thread Darryn Brooking
To :

Can I have a copy of the output (stout and sterr) to compare to mine?

In cmd.exe the commands I run are:
D:\Dev\dspace\vagrant-dspace>git pull
D:\Dev\dspace\vagrant-dspace>vagrant destroy
D:\Dev\dspace\vagrant-dspace>vagrant up > vagrant.log 2>&1

I want the vagrant.log that is generated. I'd prefer a windows log but I 
don't think the host OS matters all that much for this purpose.

Mine is (still) not working, and atm I'm not even sure where its going 
wrong.

Cheers
Darryn

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


Re: [dspace-tech] Topic for a future DCAT call: "The need for speed - let's talk DSpace performance"

2017-02-19 Thread Alan Orth
Hi, Bram.

Yes, I think this is an important topic. We are running a rather advanced,
optimized stack on fast hardware, but DSpace is still slow enough that my
editors complain fairly often. I don't have any hard numbers, but someone
should really do some proper benchmarking (ie, benchmark from two separate
machines, where the client is more powerful than the server, with some
multi-threaded test tool like vegeta).

For reference, our production DSpace (5.5, XMLUI) is running on a Linode
VPS with twenty-four GB of RAM, SSD storage, and eight CPUs! PostgreSQL is
using 10% of system RAM for buffers, Tomcat JVM heap is using a six GB heap
but with plenty to spare, and the rest of system RAM is used for Solr
indexes. Our software stack is nginx→Tomcat, but even if you circumvent
nginx and go straight to Tomcat it's the same. We basically have zero
resource contention/bottlenecks. You should see our system graphs: CPU
usage is like 100–200% out of 800% (eight CPUs) and RAM usage is 75%
allocated to buffers, which Linux does just because the RAM isn't being
used by any applications!

Single-threaded indexing performance is the next topic, since repository
sizes are growing and this is becoming a nuisance!

I could be involved in this, it is very interesting to me. Thanks!

On Sat, Feb 18, 2017 at 1:34 PM emilio lorenzo  wrote:

> Hi,
>
> My vote, It is a relevant issue
>
> Best
>
> Emilio
>
>
> El 18/02/2017 a las 11:46, Bram Luyten escribió:
>
> Hi,
>
> apologies for cross posting but though this would be of interest to the
> different lists.
>
> Because this could be a relatively technical topic, I wanted to see if
> there's an interest to dedicate one of the next DCAT calls to DSpace
> performance:
>
> - are your pages loading fast enough?
> - are you suffering from downtime and how are you dealing with this?
> - which performance related JIRA tickets are out there and should we raise
> attention to them?
> - Show & tell of approaches, for example,
> https://wiki.duraspace.org/display/~terrywbrady/Using+New+Relic+to+Monitor+XMLUI
> 
>
> What do you think? Too technical? Relevant? Should we schedule it?
>
> cheers,
>
> Bram
>
> [image: logo] Bram Luyten
> 250-B Suite 3A, Lucius Gordon Drive, West Henrietta, NY 14586
> Esperantolaan 4, Heverlee 3001, Belgium
> atmire.com
> 
> --
> You received this message because you are subscribed to the Google Groups
> "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dspace-tech+unsubscr...@googlegroups.com.
> To post to this group, send email to dspace-tech@googlegroups.com.
> Visit this group at https://groups.google.com/group/dspace-tech.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dspace-tech+unsubscr...@googlegroups.com.
> To post to this group, send email to dspace-tech@googlegroups.com.
> Visit this group at https://groups.google.com/group/dspace-tech.
> For more options, visit https://groups.google.com/d/optout.
>
-- 

Alan Orth
alan.o...@gmail.com
https://englishbulgaria.net
https://alaninkenya.org
https://mjanja.ch

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.