Experienced a similar problem where assetstore was owned by user dspace,
group dspace. Tomcat was running as user tomcat with primary group tomcat.
Tomcat did also belong to group dspace but whenever it added files to the
assetstore it would set the group owner to be tomcat. I have thought about
setting the SGID bit on the assetstore directory, my understanding is that
anything added to the directory will have the owner set to be the owner of
the directory ie dspace. This would ensure that any other process belonging
to group dspace would still be able to access all the files. However, I
haven't implemented this yet !

Cheers, Robin.
 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Diggory
Sent: 27 November 2007 15:25
To: Mika Stenberg
Cc: '[email protected]'
Subject: Re: [Dspace-tech] Importer error

Looks like a permissions error on the file system. If you are running tomcat
under the tomcat user and your Importer under the dspace user this is an
issue that will arise.

I really haven't a "great" solution for this yet. I put the tomcat user in
the dspace group and set a sticky bit on the directories so that they are
group owned by dspace, but the init.d start script used for tomcat on Linux
usually forces a specific umask on the tomcat server so that you can't
assure that new files are group writable.  
Ultimately leading me to need a cron script that periodically rewrites the
permissions in the assetstore.


An alternative strategy I've worked on today is to assign the dspace and
tomcat users the same uid and gid so that they have identical user
permissions.

Ultimately, this exposes a certain ugliness in the way that clients/
applications use a dspace instance. Rather than a service one accesses to do
tasks (which would operate in its own process with its own permissions),
instead we see that DSpace is simply a set of libraries that can be executed
on an assetstore/database pair... and there are so many places that can get
screwed up.


-Mark

On Nov 27, 2007, at 8:48 AM, Mika Stenberg wrote:

> Would someone know what might be causing the importer to throw error 
> like below. All the files are there. Is this a permission issue?
>
>
> Thanks,
> Mika
>
> Processing contents file: /var/www/tds_submit/dc/674/0/contents
> java.io.IOException: No such file or directory
>       at java.io.UnixFileSystem.createFileExclusively(Native Method)
>       at java.io.File.createNewFile(File.java:850)
>       at
edu.sdsc.grid.io.local.LocalFile.createNewFile(LocalFile.java:486)
>       at
> org.dspace.storage.bitstore.BitstreamStorageManager.store
> (BitstreamStorageManager.java:332)
>       at org.dspace.content.Bitstream.create(Bitstream.java:184)
>       at org.dspace.content.Bundle.createBitstream(Bundle.java:362)
>       at
> org.dspace.app.itemimport.ItemImport.processContentFileEntry
> (ItemImport.java:1111)
>       at
> org.dspace.app.itemimport.ItemImport.processContentsFile
> (ItemImport.java:1038)
>       at org.dspace.app.itemimport.ItemImport.addItem(ItemImport.java:639)
>       at
org.dspace.app.itemimport.ItemImport.addItems(ItemImport.java:506)
>       at org.dspace.app.itemimport.ItemImport.main(ItemImport.java:415)
> java.io.IOException: No such file or directory
>
> ----------------------------------------------------------------------
> ---
> This SF.net email is sponsored by: Microsoft Defy all challenges. 
> Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to