Error trying to upload or delete files after upgrading (2.0.3 to 2.1.1)

Hi! I've been having problems when uploading or deleting files since I upgraded from 2.0.3 to 2.1.1. After checking the log I thought it could be a permissions issue so I changed the "File" folder permissions from 755 to 775 but it hasn't solved the problem.

This is the error I get when trying to upload a file.

2013-09-26T11:18:30+02:00 ERR (3): exception 'Omeka_Storage_Exception' with message 'Destination directory is not writable: '/srv/www/htdocs/omeka-2.1.1m/files/original'.' in /srv/www/htdocs/omeka-2.1.1m/application/libraries/Omeka/Storage/Adapter/Filesystem.php:219
Stack trace:
#0 /srv/www/htdocs/omeka-2.1.1m/application/libraries/Omeka/Storage/Adapter/Filesystem.php(116): Omeka_Storage_Adapter_Filesystem->_rename('/tmp/ef3bccb76f...', '/srv/www/htdocs...')
#1 [internal function]: Omeka_Storage_Adapter_Filesystem->store('/tmp/ef3bccb76f...', 'original/ef3bcc...')
#2 /srv/www/htdocs/omeka-2.1.1m/application/libraries/Omeka/Storage.php(67): call_user_func_array(Array, Array)
#3 /srv/www/htdocs/omeka-2.1.1m/application/models/File.php(430): Omeka_Storage->__call('store', Array)
#4 /srv/www/htdocs/omeka-2.1.1m/application/models/File.php(430): Omeka_Storage->store('/tmp/ef3bccb76f...', 'original/ef3bcc...')
#5 /srv/www/htdocs/omeka-2.1.1m/application/models/Job/FileProcessUpload.php(23): File->storeFiles()
#6 /srv/www/htdocs/omeka-2.1.1m/application/libraries/Omeka/Job/Dispatcher/Adapter/Synchronous.php(25): Job_FileProcessUpload->perform()
#7 /srv/www/htdocs/omeka-2.1.1m/application/libraries/Omeka/Job/Dispatcher/Default.php(136): Omeka_Job_Dispatcher_Adapter_Synchronous->send('{"className":"J...', Array)
#8 /srv/www/htdocs/omeka-2.1.1m/application/models/File.php(209): Omeka_Job_Dispatcher_Default->send('Job_FileProcess...', Array)
#9 [internal function]: File->afterSave(Array)
#10 /srv/www/htdocs/omeka-2.1.1m/application/libraries/Omeka/Record/AbstractRecord.php(277): call_user_func(Array, Array)
#11 /srv/www/htdocs/omeka-2.1.1m/application/libraries/Omeka/Record/AbstractRecord.php(550): Omeka_Record_AbstractRecord->runCallbacks('afterSave', Array)
#12 /srv/www/htdocs/omeka-2.1.1m/application/models/Item.php(322): Omeka_Record_AbstractRecord->save()
#13 /srv/www/htdocs/omeka-2.1.1m/application/models/Item.php(235): Item->saveFiles()
#14 [internal function]: Item->afterSave(Array)
#15 /srv/www/htdocs/omeka-2.1.1m/application/libraries/Omeka/Record/AbstractRecord.php(277): call_user_func(Array, Array)
#16 /srv/www/htdocs/omeka-2.1.1m/application/libraries/Omeka/Record/AbstractRecord.php(550): Omeka_Record_AbstractRecord->runCallbacks('afterSave', Array)
#17 /srv/www/htdocs/omeka-2.1.1m/application/libraries/Omeka/Controller/AbstractActionController.php(144): Omeka_Record_AbstractRecord->save(false)
#18 /srv/www/htdocs/omeka-2.1.1m/application/controllers/ItemsController.php(149): Omeka_Controller_AbstractActionController->addAction()
#19 /srv/www/htdocs/omeka-2.1.1m/application/libraries/Zend/Controller/Action.php(516): ItemsController->addAction()
#20 /srv/www/htdocs/omeka-2.1.1m/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('addAction')
#21 /srv/www/htdocs/omeka-2.1.1m/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#22 /srv/www/htdocs/omeka-2.1.1m/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#23 /srv/www/htdocs/omeka-2.1.1m/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#24 /srv/www/htdocs/omeka-2.1.1m/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#25 /srv/www/htdocs/omeka-2.1.1m/admin/index.php(28): Omeka_Application->run()
#26 {main}

Besides the upgrading I also added the Derivative Images 1.0 plugin and changed ".browse .item-img img" height and width from themes/default/css/style.css file. Could some of this changes be the real problem?

Thanks in advance!

The error looks like there are more permissions to be set. In addition to files, make sure that all the directories under it are also writable by the server.

Hi, thanks for your help. All the directories under "Files" are also in 775 but the problem still persists. I can't upload neither remove attached files and I don't know what to try next.

Any ideas?

Thanks

The permissions needed for the "files" folder and its subdirectories in Omeka 2.1 haven't changed. They're the same as they were for 2.0 and the same as the permissions for the "archive" folder in 1.x. Omeka simply needs to be able to read and write in those directories.

What this means on a particular server can be somewhat different, though. On many setups, 775, 770, or similar permissions are appropriate, but only if the folders are set to a group that the webserver belongs to. On others, Omeka executes as the same user you log in to the server as, so only the owning user needs read/write permissions.

Regardless, the permissions should just be configured the same way as they were previously, for both user/group ownership, and for the permissions "mode."

Hi, thanks for your response, but as I said in my previous post, all the folders under "Files" have the appropiate permissions. Actually, before upgrading the program I didn't have any problem uploading files, so I don't know what could have changed.

The code I wrote in my first post seems to indicate that is a permissions issue, but could it be something else?

Thanks again