"File can't be written" error when creating items, permissions 777


I was attempting to import the content from our digital library (http://www.cppdigitallibrary.org) and though the collections are imported, the items are not. To test, I tried creating an item manually an uploading the file, and I’m receiving the error, “File can’t be written.” I then tried uploading via an FTP as well as well as creating a directory, and both failed. What confuses me though, is that this is happening even when I set the permissions of the directory to drwxrwxrwx (777). I’m sure I’m doing something stupid, but I haven’t been able to track down an answer on Stack Exchange or the Ubuntu forums, so any help is greatly appreciated, thanks!

Tristan Dahn
Digital Projects Librarian
Historical Medical Library of the College of Physicians of Philadelphia

Could you enable the log in order to have more info (set SetEnv APPLICATION_ENV development in .htaccess at the root of Omeka).

See Cannot upload any files and errors.log doesn't work too.

If Linux permissions of the directory are 777, you can check permissions of its parent directory, SELinux context and apache configuration (apache2.conf, .htaccess files).

Thanks for both of your replies! Both were helpful in thinking about the problem, and it was definitely worth noting where to change the log writing to development.

In case you’re interested, it turned out to be related to a memory error (I believe in the Apache tmp directory) caused by not properly having ImageMagick installed when I first attempted the import. I didn’t have the pre-requisite PHP installed as per these instructions https://www.theshell.guru/install-imagemagick-ubuntu-16-04/, which meant that the files weren’t being processed properly which overflowed the tmp directory and made it so I couldn’t write files anywhere. Running apt-get clean freed up the memory, but something else had gone wrong and I couldn’t get the dependencies to install still, so I just dumped the whole server, spun up another one and made sure everything was in place before running the import, which seems to be handling and writing the images correctly now.