How to fix common item import errors
Fix: java.io.IOException: No such file or directory at java.io.UnixFileSystem.createFileExclusively(Native Method)
When importing, you see this error:
If you are importing a collecting of items, it will often fail at different items.
The normal issue that causes this is if you have been running the importer as a different user to the user that is running tomcat, or another user has been changing files (maybe running the filter-media cron job as root etc). Check that all of the directories under dspace/assetstore/ are owned by the correct user.
DSpace randomly selects a set of directories to put a new file in, and if one of these happens to not be owned by the same user you are running the importer as, then it won't be able to write the file, and will stop. So check they are all owned by the correct user or that you have the correct permissions to write to them.
Because Dspace randomly chooses the directories to write the file to, the importer will stop and different places randomly.
You can fix the problem by using a command such as
where user is the username that the assetstore should be owned by (often tomcat or dspace) and dspace is the location of your DSpace installation.