# PermissionError: [Errno 13] Permission denied (while deploying to Digital Ocean Droplet)

**URL:** https://discourse.roots.io/t/permissionerror-errno-13-permission-denied-while-deploying-to-digital-ocean-droplet/27107
**Category:** trellis
**Created:** 2024-05-05T22:30:12Z
**Posts:** 2

## Post 1 by @rmcorre — 2024-05-05T22:30:12Z

Hi,

Got the following error and not sure where to begin debugging as I am new at this. Looked through the posts on here and checked the documentation but couldn’t find a solution. Any help on where to begin is greatly appreciated.

TASK [deploy : Initialize] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: PermissionError: [Errno 13] Permission denied: ‘/srv/www/woo-playground.local’  
fatal: [159.223.220.4]: FAILED! =\> {“changed”: false, “module\_stderr”: “Traceback (most recent call last):\n File "", line 107, in \n File "", line 99, in \_ansiballz\_main\n File "", line 47, in invoke\_module\n File "/usr/lib/python3.8/runpy.py", line 207, in run\_module\n return \_run\_module\_code(code, init\_globals, run\_name, mod\_spec)\n File "/usr/lib/python3.8/runpy.py", line 97, in \_run\_module\_code\n \_run\_code(code, mod\_globals, init\_globals,\n File "/usr/lib/python3.8/runpy.py", line 87, in \_run\_code\n exec(code, run\_globals)\n File "/tmp/ansible\_deploy\_helper\_payload\_fucausf0/ansible\_deploy\_helper\_payload.zip/ansible\_collections/community/general/plugins/modules/deploy\_helper.py", line 536, in \n File "/tmp/ansible\_deploy\_helper\_payload\_fucausf0/ansible\_deploy\_helper\_payload.zip/ansible\_collections/community/general/plugins/modules/deploy\_helper.py", line 499, in main\n File "/tmp/ansible\_deploy\_helper\_payload\_fucausf0/ansible\_deploy\_helper\_payload.zip/ansible\_collections/community/general/plugins/modules/deploy\_helper.py", line 357, in create\_path\n File "/usr/lib/python3.8/os.py", line 223, in makedirs\n mkdir(name, mode)\nPermissionError: [Errno 13] Permission denied: ‘/srv/www/woo-playground.local’\n”, “module\_stdout”: “”, “msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”, “rc”: 1}

Thanks and best regards

---

## Post 2 by @rmcorre — 2024-05-07T00:22:43Z

Should anyone encounter the same problem, I was able to fix this issue by doing the following:

- Destroyed the droplet I created using **trellis droplet create _environment_** command

- Created a new droplet on the Digital Ocean platform

- Ran the **trellis provision _environment_** command

- If there are any errors during provisioning, run **trellis provision _environment_** repeatedly until provisioning is complete with no errors

- Ran the **trellis deploy _environment_** command to deploy the project to the server

- Documentation: [https://roots.io/trellis/docs/remote-server-setup/](https://roots.io/trellis/docs/remote-server-setup/)
