EPrints Technical Mailing List Archive
Message: #08431
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Help EPrints System Error Can't open to write to file:
- To: <eprints-tech@ecs.soton.ac.uk>, Aris Kurniawan <ariskurniawanlib@gmail.com>
- Subject: Re: [EP-tech] Help EPrints System Error Can't open to write to file:
- From: David R Newman <drn@ecs.soton.ac.uk>
- Date: Tue, 5 Jan 2021 09:52:43 +0000
Hi Aris,
It looks like your EPrints path is a bit odd. I would check that the directory /usr/share/eprints3/ actually exists as I would expect it to be /usr/share/eprints/ normally. If that is correct this sounds like a filesystem permissions issue. On a Debian 10 VM I have installed from the EPrints DEB package I checked the following and you need to do much the same:
1. Run "ls -la /usr/share/eprints3/archives/repositoryupt/html/en/subjects/" and check that the permissions are like the following:
drwxrwsr-x 2 www-data eprints 4096 Dec 17 23:48 .
drwxrwsr-x 3 www-data eprints 4096 Dec 17 23:48 ..
-rwxrwxr-x 1 www-data eprints 5042 Dec 17 23:48 index.html
-rwxrwxr-x 1 www-data eprints 32 Dec 17 23:48 index.include
-rwxrwxr-x 1 www-data eprints 32 Dec 17 23:48 index.page
-rwxrwxr-x 1 www-data eprints 0 Dec 17 23:48 index.template
-rwxrwxr-x 1 www-data eprints 17 Dec 17 23:48 index.title
-rwxrwxr-x 1 www-data eprints 17 Dec 17 23:48
index.title.textonly
If the are not then my advice would be to completely remove the contents (or at least move /tmp/) of the /usr/share/eprints3/archives/repositoryupt/html/en/ directory and see if the pages regenerate after that.
2. If that does not work it is worth checking the permissions of /usr/share/eprints3/archives/repositoryupt/html/ directory which should look like:
drwxrwsr-x 3 eprints eprints 4096 Dec 17 15:56 .
drwxrwsr-x 7 eprints eprints 4096 Dec 17 15:53 ..
Both the html and the parent directory (in your case
repositoryupt) should be owned and have eprints as their group and
have the permissions drwxrwsr-x. If this is not the case I would
use chown and chmod to amend this:
sudo chown eprints:eprints /usr/share/eprints3/archives/repositoryupt/html/
sudo chmod 2775 /usr/share/eprints3/archives/repositoryupt/html/
3. If this still has not worked I would check the user who is running Apache. For a DEB package install this should be www-data. If you run "ps aux | grep apache" you should see something like:
root 667 0.1 9.9 241740 202308 ? Ss 09:10 0:02
/usr/sbin/apache2 -k start
www-data 696 0.0 9.7 987804 199500 ? Sl 09:10 0:00
/usr/sbin/apache2 -k start
www-data 697 0.0 9.7 987804 199500 ? Sl 09:10 0:00
/usr/sbin/apache2 -k start
There may also be another line for the grep in the command to get this list and more of the lines that start www-data. If there are no lines with www-data then there is an issue and it is likely someone modified /etc/apache2/envvars. You could change the "export APACHE_RUN_USER" and "export APACHE_RUN_GROUP" back to www-data but if this has been manually changed by someone there may have been a good reason for this and changing it may make things worse.
4. The final thing you could check is the groups that both the eprints and www-data users belong to with the command:
groups eprints www-data
This should output something like:
eprints : eprints www-data
www-data : www-data eprints
If the eprints and www-data users are not both part of the eprints and www-data groups you should add then manually with usermod:
sudo usermod -a -G www-data eprints
sudo usermod -a -G eprints www-data
I would also advise restarting Apache after doing this. It should not be necessary but it rules out any chance permissions not being applied because Apache was already running. If after doing all this you still have an issue I am at a bit of a loss. If you can reply with the results of the various ls, ps and groups commands I have recommeded above it may give me or others more of an insight into what you problem is.
Regards
David Newman
CAUTION: This e-mail originated outside the University of Southampton.when I switched from the old server to the new server I had a problem,
old server = eprints version 3.3. using Ubuntu Server 14
new server = eprints version 3.3 using ubuntu Server 18
when I opened the Browse by Subject and Browse By Author menu, the page displayed an error
BROWSE SUBJECTS
LINK = http://repository.unsoed.ac.id/view/subjects/
EPrints System Error Can't open to write to file: cindex.html
BROWSE AUTHOR
LINK = http://repository.unsoed.ac.id/view/creators/
ERRORs: EPrints System Error Can't open to write to file: /usr/share/eprints3/archives/repositoryupt/html/en/view/creators/index.A.html
how do i solve this problem?
*** 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/
- References:
- [EP-tech] Help EPrints System Error Can't open to write to file:
- From: Aris Kurniawan <ariskurniawanlib@gmail.com>
- [EP-tech] Help EPrints System Error Can't open to write to file:
- Prev by Date: Re: [EP-tech] Word Documents won't download
- Next by Date: Re: [EP-tech] Word Documents won't download
- Previous by thread: [EP-tech] Sort view with creators_name and corp_creators
- Index(es):