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

[EP-tech] Help EPrints System Error Can't open to write to file:



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

On 05/01/2021 07:20, Aris Kurniawan via Eprints-tech wrote:
> *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 = https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Frepository.unsoed.ac.id%2Fview%2Fsubjects%2F&data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C42ee71fce73a4d70c46d08d8b15fa814%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637454371678698486%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4wmI4niLtNnN5ynUHzvkfbnyslAeohJoTp8TqZ%2FIvz0%3D&reserved=0 
> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Frepository.unsoed.ac.id%2Fview%2Fsubjects%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C42ee71fce73a4d70c46d08d8b15fa814%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637454371678698486%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=4wmI4niLtNnN5ynUHzvkfbnyslAeohJoTp8TqZ%2FIvz0%3D&amp;reserved=0>
> EPrints System Error Can't open to write to file: cindex.html
>
> BROWSE AUTHOR
> LINK = https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Frepository.unsoed.ac.id%2Fview%2Fcreators%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C42ee71fce73a4d70c46d08d8b15fa814%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637454371678698486%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=HHqR0GNe%2FJhbZ3AwGnmF1%2BTJtAvklsJjSsvQQvF1B5c%3D&amp;reserved=0 
> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Frepository.unsoed.ac.id%2Fview%2Fcreators%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C42ee71fce73a4d70c46d08d8b15fa814%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637454371678703464%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=1Nxpo%2Fm0tTa9uqjG7xVRHsTChLW%2BdIOTmjC%2F59sWLvg%3D&amp;reserved=0>
> 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: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C42ee71fce73a4d70c46d08d8b15fa814%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637454371678703464%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=4BUFhQDBt8pqCcr1gOHZaBthbD1FL%2Ff9sjN7DS%2FbAzQ%3D&amp;reserved=0
> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C42ee71fce73a4d70c46d08d8b15fa814%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637454371678703464%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=zN0z%2BmJgkrqCNW9MCSuG4RaDxKw0FoY3rvXWTHI62is%3D&amp;reserved=0


-- 
This email has been checked for viruses by AVG.
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avg.com%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C42ee71fce73a4d70c46d08d8b15fa814%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637454371678703464%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=cBvDfd%2F2l4QiRORuUUEkWw3THkdnXs6jkZPhPi2KjYg%3D&amp;reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20210105/2999b123/attachment.html