We recently upgraded to 2.0.1. After some permissions issues we were finally able to upload files.
This week we had IT recreate the files/original folder to increase the quota as most of our files will be audio and we didn't want to run into file allocation problems. Since then we cannot upload files into Omeka.
When I upload a file I get this message:
File Upload: File '1999-005-007.jpg' can't be written
When I try to upload through Dropbox, it takes me to an Omeka error screen. We don't have error messages enabled because the last time I tried to enable them it broke the entire site.
Could resetting the file quota on the directory cause some link to be broken?
Did you add files to the Dropbox plugin's files folder [/plugins/Dropbox/files]? That is the only way you can batch upload files from the server.
You will also need to ask your technical staff to
make 'files' folder located in the /Dropbox plugin directory writable to the Apache server.
Yes, there are files in the Dropbox folder. Before replacing 'files/original' we were able to upload either individual files or files that were in Dropbox.
After IT deleted 'files/original' and recreated these directories with increased quota allocation we were no longer able to upload files by either method.
Would recreation of these files cause them to no longer be available to Omeka?
When the directory got recreated, did you or IT make sure to set the permissions back the way they were withe old one?
Bad permissions is the easy guess.
That was my first guess also and they checked permissions. Also I can copy items to the folder, but I can't upload to it.
Here is the error message associated with this upload:
Any help will be greatly appreciated. Thanks.
#0 /mnt/sites/oralhistory.eku.edu/application/libraries/Omeka/File/Ingest/AbstractSourceIngest.php(126): Omeka_File_Ingest_Filesystem->_transfer('/mnt/sites/oral...', '/tmp/e426499838...', Array)
#1 /mnt/sites/oralhistory.eku.edu/application/libraries/Omeka/File/Ingest/AbstractIngest.php(179): Omeka_File_Ingest_AbstractSourceIngest->_transferFile(Array, '1986oh091-Darli...')
#2 /mnt/sites/oralhistory.eku.edu/application/models/Builder/Item.php(200): Omeka_File_Ingest_AbstractIngest->ingest(Array)
#3 /mnt/sites/oralhistory.eku.edu/application/libraries/globals.php(554): Builder_Item->addFiles('Filesystem', Array, Array)
#4 /mnt/sites/oralhistory.eku.edu/plugins/Dropbox/DropboxPlugin.php(102): insert_files_for_item(Object(Item), 'Filesystem', Array, Array)
#5 [internal function]: DropboxPlugin->hookAfterSaveItem(Array)
#6 /mnt/sites/oralhistory.eku.edu/application/libraries/Omeka/Plugin/Broker.php(157): call_user_func(Array, Array)
#7 /mnt/sites/oralhistory.eku.edu/application/libraries/Omeka/Record/AbstractRecord.php(298): Omeka_Plugin_Broker->callHook('after_save_item', Array)
#8 /mnt/sites/oralhistory.eku.edu/application/libraries/Omeka/Record/AbstractRecord.php(550): Omeka_Record_AbstractRecord->runCallbacks('afterSave', Array)
#9 /mnt/sites/oralhistory.eku.edu/application/libraries/Omeka/Controller/AbstractActionController.php(176): Omeka_Record_AbstractRecord->save(false)
#10 /mnt/sites/oralhistory.eku.edu/application/controllers/ItemsController.php(88): Omeka_Controller_AbstractActionController->editAction()
#11 /mnt/sites/oralhistory.eku.edu/application/libraries/Zend/Controller/Action.php(516): ItemsController->editAction()
#12 /mnt/sites/oralhistory.eku.edu/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('editAction')
#13 /mnt/sites/oralhistory.eku.edu/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#14 /mnt/sites/oralhistory.eku.edu/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#15 /mnt/sites/oralhistory.eku.edu/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#16 /mnt/sites/oralhistory.eku.edu/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#17 /mnt/sites/oralhistory.eku.edu/admin/index.php(28): Omeka_Application->run()
We are also having the same issue. On our end, it happened before we upgraded to 2.0.1 -- I upgraded to see if that would make the issue go away, but it hasn't. I can create an item, but only if I don't attach any files to it. Trying to upload files results in the error below.
The problem persisted when I tried setting permissions on the [omeka]/files folder to 777. So it must be some other folder needing permissions, but I don't know which folder. Here's the error stack; any help would be much appreciated.
The given destination is not writeable
#0 /home/web/bucr/application/libraries/Omeka/File/Ingest/Upload.php(37): Zend_File_Transfer_Adapter_Abstract->setDestination('/tmp/digilib.bu...')
#1 /home/web/bucr/application/libraries/Omeka/File/Ingest/Upload.php(109): Omeka_File_Ingest_Upload->_buildAdapter()
#2 /home/web/bucr/application/libraries/Omeka/File/Ingest/AbstractIngest.php(168): Omeka_File_Ingest_Upload->_parseFileInfo('file')
#3 /home/web/bucr/application/models/Builder/Item.php(200): Omeka_File_Ingest_AbstractIngest->ingest('file')
#4 /home/web/bucr/application/libraries/globals.php(554): Builder_Item->addFiles('Upload', 'file', Array)
#5 /home/web/bucr/application/models/Item.php(307): insert_files_for_item(Object(Item), 'Upload', 'file', Array)
#6 /home/web/bucr/application/models/Item.php(217): Item->_uploadFiles()
#7 [internal function]: Item->beforeSave(Array)
#8 /home/web/bucr/application/libraries/Omeka/Record/AbstractRecord.php(277): call_user_func(Array, Array)
#9 /home/web/bucr/application/libraries/Omeka/Record/AbstractRecord.php(531): Omeka_Record_AbstractRecord->runCallbacks('beforeSave', Array)
#10 /home/web/bucr/application/libraries/Omeka/Controller/AbstractActionController.php(144): Omeka_Record_AbstractRecord->save(false)
#11 /home/web/bucr/application/controllers/ItemsController.php(149): Omeka_Controller_AbstractActionController->addAction()
#12 /home/web/bucr/application/libraries/Zend/Controller/Action.php(516): ItemsController->addAction()
#13 /home/web/bucr/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('addAction')
#14 /home/web/bucr/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#15 /home/web/bucr/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#16 /home/web/bucr/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#17 /home/web/bucr/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#18 /home/web/bucr/admin/index.php(28): Omeka_Application->run()
In case it helps, here are the permissions as they stand now (note that for some reason we have both an archive folder and a files folder -- shouldn't there be only one?)
drwxr-xr-x 9 apache apache 4096 Apr 5 15:22 .
drwxr-xr-x 60 apache apache 4096 Apr 4 13:08 ..
drwxr-xr-x 3 apache apache 4096 Mar 19 15:35 admin
drwxr-xr-x 13 apache apache 4096 Mar 19 15:35 application
drwxr-xr-x 2 apache apache 4096 Apr 4 14:49 archive
-rw-r--r-- 1 apache apache 5553 Mar 19 15:35 bootstrap.php
-rw-r--r-- 1 apache apache 529 Sep 13 2012 db.ini
drwxr-xr-x 8 apache apache 4096 Apr 4 13:04 files
-rw-r--r-- 1 root root 2588 Apr 5 14:08 .htaccess
-rw-r--r-- 1 apache apache 1550 Apr 4 15:01 htaccess.txt
-rw-r--r-- 1 apache apache 588 Mar 19 15:35 index.php
drwxr-xr-x 6 apache apache 4096 Mar 19 15:35 install
-rw-r--r-- 1 apache apache 35147 Mar 19 15:35 license.txt
drwxr-xr-x 9 apache apache 4096 Apr 4 13:10 plugins
-rw-r--r-- 1 apache apache 1229 Mar 19 15:35 README.md
-rw-r--r-- 1 apache apache 32 Mar 19 15:35 robots.txt
drwxr-xr-x 5 apache apache 4096 Mar 19 15:35 themes
libcoutu: The line or two just above what you pasted would be useful, that's the exception name and message.
vzafrin: In this cases it looks like its the /tmp directory you don't have permissions to write to.
Omeka initially stores files in /tmp to process them, so it need to be able to write to there. You could alter the /tmp directory permissions so you can write there, or you could change the Omeka config.ini setting
storage.tempDir to a different directory (which you'd still need write permissions to).
Thanks, John. Do you mean /tmp in the root directory of the server, or /tmp as a first-level-down folder inside the Omeka folder? There's no tmp directory inside the Omeka folder.
I tried creating [omeka]/tmp and setting the ownership to apache:apache (our web server), and tinkering with permissions up to and including setting them to 777. That didn't work. I moved tmp inside [omeka]/files, and that didn't work either.
There's a tmp directory in the root folder of our server, and the permissions on it are set to drwxrwxrwt -- which looks very permissive to me.
I checked out application/config/config.ini, and there's no setting for storage.tempDir. The only config parameters starting with storage are storage.adapter* -- is there a different config.ini I should be looking for? The only other ones I have are all inside themes and plugins.
Still having this issue -- John, do you have any more input re above? I'd really appreciate it!
The default is usually
/tmp, at the root of the filesytem, not inside your Omeka directory. Although, looking at your error message, it actually reported that the destination was
/tmp/digilib.bu... (it truncates long arguments).
You were looking in the right config.ini file. If there's not an "example" line for any config setting, you can just add a new one. You could try setting that to the new folder you created, or even to
/tmp. The path needs to be an absolute one, starting from the filesystem root.
That worked! Thanks so much, John. I am beyond puzzled as to why there was no storage.tempDir line in our config.ini file at all. But I added it, and set the value to /tmp, and things seem to work now.