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

[EP-tech] Re: Using soft-linked storage location for documents



Hi Mark,

Yes, I've always known them as soft-links, but I should have clarified by referring to them as symlinks too.

I had a look into the httpd config file and added a FollowSymLinks directive. There was no difference at all to eprints, even after a couple of restarts of Apache, though I do feel you might be onto something.

If I carry out an ls of the eprints directories as the eprints user I can traverse all the way to the disk0 folder without a problem. I can also touch files in there as the same user. However, if I try to access the "status" from the eprints admin section I get the "No storage directories found in /usr/share/eprints/archives/[repoid]/documents" error in a browser and the following in the httpd error_log:

Failed to mkdir /usr/share/eprints/archives/eresearch/documents/disk0: File exists
------------------------------------------------------------------
---------------- EPrints System Error ----------------------------
------------------------------------------------------------------
No storage directories found in /usr/share/eprints/archives/eresearch/documents
------------------------------------------------------------------
 at /usr/share/eprints/perl_lib/EPrints/Repository.pm line 1753
	EPrints::Repository::get_store_dirs('EPrints::Repository=HASH(0x7f5e70eb9b80)') called at /usr/share/eprints/perl_lib/EPrints/Plugin/Screen/Status.pm line 237
	EPrints::Plugin::Screen::Status::render('EPrints::Plugin::Screen::Status=HASH(0x7f5e725523c0)') called at /usr/share/eprints/perl_lib/EPrints/ScreenProcessor.pm line 377
	EPrints::ScreenProcessor::process('EPrints::ScreenProcessor', 'session', 'EPrints::Repository=HASH(0x7f5e70eb9b80)', 'template', undef, 'url', '/cgi/users/home') called at /usr/share/eprints/cgi/users/home line 25
	ModPerl::ROOT::ModPerl::Registry::usr_share_eprints_cgi_users_home::handler('Apache2::RequestRec=SCALAR(0x7f5e733bd5b0)') called at /usr/lib64/perl5/ModPerl/RegistryCooker.pm line 204
	eval {...} called at /usr/lib64/perl5/ModPerl/RegistryCooker.pm line 204
	ModPerl::RegistryCooker::run('ModPerl::Registry=HASH(0x7f5e733af200)') called at /usr/lib64/perl5/ModPerl/RegistryCooker.pm line 170
	ModPerl::RegistryCooker::default_handler('ModPerl::Registry=HASH(0x7f5e733af200)') called at /usr/lib64/perl5/ModPerl/Registry.pm line 31
	ModPerl::Registry::handler('ModPerl::Registry', 'Apache2::RequestRec=SCALAR(0x7f5e733bd5b0)') called at -e line 0
	eval {...} called at -e line 0

So, I can access the directory on the server itself, but not from the web front end. It definitely looks like there may be something wrong with the Apache config, so I will try chasing that down.

Thank you for replying and for giving me somewhere else to look. As I mentioned in my original email, this has dragged on for some time now, and I was starting to think I was going mad. Any further advice would be gratefully received.

Kind regards,

James
________________________________________
From: eprints-tech-bounces at ecs.soton.ac.uk [eprints-tech-bounces at ecs.soton.ac.uk] on behalf of Mark Gregson [mark.gregson at qut.edu.au]
Sent: 08 October 2013 02:24
To: 'eprints-tech at ecs.soton.ac.uk'
Subject: [EP-tech] Re: Using soft-linked storage location for documents

When you say 'soft-link' do you mean symlink?

If so, is it a problem with httpd config? See the Options directive http://httpd.apache.org/docs/2.2/mod/core.html#options and the FollowSymLinks option.

Cheers
Mark

Mark Gregson | Applications and Development Team Leader
Library eServices | Queensland University of Technology
Level 3 | R Block | Kelvin Grove Campus | GPO Box 2434 | Brisbane 4001
Phone: +61 7 3138 3782 | Web: http://eprints.qut.edu.au/
ABN: 83 791 724 622
CRICOS No: 00213J


-----Original Message-----
From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Caldow, James
Sent: Friday, 4 October 2013 8:59 PM
To: EPrints.org Technical List
Subject: [EP-tech] Using soft-linked storage location for documents

Hi,

I am hoping someone can offer some advice, as I have a problem which has dragged on for some time now.

We have a replacement repository in progress in which the decision was taken to have the documents folder soft-linked to a separate drive. This was done with the intention of allowing easier expansion in the future and splitting content from the main software for archival purposes.

I have installed the base eprints software, added the storage location to the system, created the soft-link, etc. Unfortunately, while the server recognises the storage location, I don't have the same luck with eprints. I've altered the permissions as best I understand them, and have carried out the necessary SELINUX changes.

The current structure and permissions are:

drwxrwsr-x    eprints eprints    documents

Then:

lrwxrwxrwx    apache eprints    disk0 -> /mnt/[repoid]/data

I've also run:

chcon -R -h -t httpd_sys_script_rw_t /usr/share/eprints/archives/[repoid]/documents

I have also tried changing ownership of the disk0 folder to eprints:eprints with the same effect.

This is all on a server running CentOS 6.4.

As I mentioned previously, the server has no problem accessing the mounted storage but eprints seems not to recognise it. If I visit the admin pages and view status I get the following error:

No storage directories found in /usr/share/eprints/archives/[repoid]/documents

I have tested reverting the document storage back to the default location under the eprints installation and all works perfectly. It is only when I try to move the documents outside of this location that I encounter an error. Am I trying to do something impossible, or have I missed something obvious?

Any and all advise would be gratefully received as this is really holding us back.


Kind regards,

James
*** 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/

*** 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/