File Transfer failed, reason: Unable to change to directory I'm work on updates modules in my drupal site. When i access localhost/authorize.php after linked in config, i recieve this:

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


the log is...

views

    Error installing / updating
    File Transfer failed, reason: Unable to change to directory /drupal/sites/all/modules/views

views_bulk_operations

    Error installing / updating
    File Transfer failed, reason: Unable to change to directory /drupal/sites/all/modules/views_bulk_operations

webform

    Error installing / updating
    File Transfer failed, reason: Unable to change to directory /drupal/sites/all/modules/webform

jquery_update

    Error installing / updating
    File Transfer failed, reason: Unable to change to directory /drupal/sites/all/modules/jquery_update

simplenews

    Error installing / updating
    File Transfer failed, reason: Unable to change to directory /drupal/sites/all/modules/simplenews

entityreference

    Error installing / updating
    File Transfer failed, reason: Unable to change to directory /drupal/sites/all/modules/entityreference

ctools

    Error installing / updating
    File Transfer failed, reason: Unable to change to directory /drupal/sites/sites/all/modules/ctools

entity

    Error installing / updating
    File Transfer failed, reason: Unable to change to directory /drupal/sites/all/modules/entity


I have tried to fix permissions in folder using:
sudo chmod a+w and
sudo chown root sites/default and chmod 777 , every using folder sites/default and sites/all/modules, but i canot successfuly updates my modules using ftp and automatic.... how i fix this? thanks in advance
Try executing your chown command recursively, and also assign an explicit user and your web server's group, like so: sudo chown my_user:www-data sites/all/* -R where my_user is your id and www-data is your web server's group. This will recursively apply ownership to your entire directory tree.

It might also be worth pointing out that you mention assigning ownership and privileges to sites/default, but your error messages indicate that the problem is in sites/all. :-)

In my experience, failed uploads or updates are almost always due to incorrect ownership.