# Rmtree failed: [Errno 13] Permission denied at Finalize the deploy

**URL:** https://discourse.roots.io/t/rmtree-failed-errno-13-permission-denied-at-finalize-the-deploy/11123
**Category:** trellis
**Created:** 2017-12-12T11:54:24Z
**Posts:** 5
**Showing post:** 4 of 5

## Post 4 by @runofthemill — 2017-12-12T21:56:26Z

I’ve run into this a few times before - if a prior deploy failed, Ansible will be unable to remove it (the release folder) during a subsequent deploy.

Looking at the path referenced, I’d guess your deploy on 12/09/2017 @ 22:27:49 didn’t complete, but the folder is still there.

SSH into the machine, and run `rm -rf /srv/www/mysite.com/releases/20171209222749/` - you should also run `rm -rf /srv/www/mysite.com/releases/20171212123959/` since the deploy failed on that too, so eventually you’ll run into the same issue when Trellis is trying to remove this release.

---

_[View the full topic](https://discourse.roots.io/t/rmtree-failed-errno-13-permission-denied-at-finalize-the-deploy/11123)._
