Hello,

I am trying to update drupal code to version 7.38 but always getting Update Failed error. Our website is not secure as it has old version of drupal and getting hacked every week. We always contact the hosting company to restore the website.

Does anyone have an idea of how to execute an update another way?

Error Messages:

Error message Update failed! See the log below for more information. Your site is still in maintenance mode.
views

Error installing / updating
File Transfer failed, reason: Cannot remove directory /home/topspint/public_html/sites/all/modules/views/css/ie/...
ctools

Error installing / updating
File Transfer failed, reason: Cannot remove directory /home/topspint/public_html/sites/all/modules/ctools/ctools_plugin_example/plugins/relationships/translations/...
Next steps

Your modules have been downloaded and updated.
Run database updates

Database Update give the following error:

Error
Unresolved dependency views (Missing)
Views content panes requires this module.
Error
Unresolved dependency views (Missing)
Views UI requires this module.

Thank you

Comments

John_B’s picture

So permissions and / or ownership are wrong on your folders. For example if you run a drush update or site restore as root, the new files may be owned by root. If you then try to update via the browser, or logged in with a different user then unless those directories are set to be writable by all users, update will fail. If you are on shared hosting where you have limited control over permissions, so cannot implement the solution I give, ignore the rest of my post and ask them to sort it out.

Solution: set /home/topspint/public_html and all subdirectories of it to be owned by the same user as is executing php (possibly the user who is running Apache or other webserver).

That should fix it: if it still does not work, check that sites/all/modules and sub-directories of it are writable by its owner. If it still does not work (which is unlikely), then the solution will depend on the update method your trying - drush runs with php cli, and in rare cases the user will be wrong.

Advice: run all updates from command line using drush. After doing so, unless your workflow is streamlined enough to avoid such problems, double-check that the ownership of files and folders has not changed, to avoid a repeat of the same problem at the next round of updates.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors