xforty / drush-deploy

Drupal deploy tool based on Capistrano and Drush
https://github.com/xforty/drush-deploy/wiki
Other
35 stars 4 forks source link

Cannot remove files and folders, permission denied #3

Closed dkingofpa closed 12 years ago

dkingofpa commented 12 years ago
    triggering after callbacks for `deploy'
  * executing `deploy:cleanup'
 ** keeping 5 of 7 deployed releases
  * executing "rm -rf /home/example/domains/www.example.com/releases/20120622131940 /home/example/domains/www.example.com/releases/20120622150907"
    servers: ["example.com"]
    [example@example.com] executing command
*** [err :: example@example.com] rm:
*** [err :: example@example.com] cannot remove `/home/example/domains/www.example.com/releases/20120622131940/sites/default/settings.php'
*** [err :: example@example.com] : Permission denied
*** [err :: example@example.com] 
*** [err :: example@example.com] rm:
*** [err :: example@example.com] cannot remove `/home/example/domains/www.example.com/releases/20120622131940/sites/default/default.settings.php'
*** [err :: example@example.com] : Permission denied
*** [err :: example@example.com] 
*** [err :: example@example.com] rm:
*** [err :: example@example.com] cannot remove directory `/home/example/domains/www.example.com/releases/20120622131940/sites/default/files'
*** [err :: example@example.com] : Permission denied
*** [err :: example@example.com] 
*** [err :: example@example.com] rm:
*** [err :: example@example.com] cannot remove `/home/example/domains/www.example.com/releases/20120622150907/sites/default/settings.php'
*** [err :: example@example.com] : Permission denied
*** [err :: example@example.com] 
*** [err :: example@example.com] rm:
*** [err :: example@example.com] cannot remove `/home/example/domains/www.example.com/releases/20120622150907/sites/default/default.settings.php'
*** [err :: example@example.com] : Permission denied
*** [err :: example@example.com] 
*** [err :: example@example.com] rm:
*** [err :: example@example.com] cannot remove directory `/home/example/domains/www.example.com/releases/20120622150907/sites/default/files'
*** [err :: example@example.com] : Permission denied
*** [err :: example@example.com] 
    command finished in 179ms
failed: "sh -c 'rm -rf /home/example/domains/www.example.com/releases/20120622131940 /home/example/domains/www.example.com/releases/20120622150907'" on example@example.com
medlefsen commented 12 years ago

I think your permissions may be broken :/

drush-deploy doesn't do anything weird with permissions. All file system actions are done using whatever user you tell it to log in as.

Are you using file system acls and were they setup when you ran deploy:setup initially? If so then drush-deploy should have setup acls so you didn't have to worry about permissions.

If not then this seems more likely to be a normal permission error related to a user or program (apache) overwriting files with the wrong permissions.

dkingofpa commented 12 years ago

I think @pearcec and I will need to take a closer look on the server.

pearcec commented 12 years ago

For some reason the permissions on the server was set to r-x for the owner. I set u+w and was able to remove it. Does drupal do this? does drush-deploy do this? Perhaps we should tweak drush-deploy to flip the permission before it removes it.