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


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: []: 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/", line 207, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/lib/python3.8/", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File "/usr/lib/python3.8/", line 87, in _run_code\n exec(code, run_globals)\n File "/tmp/ansible_deploy_helper_payload_fucausf0/", line 536, in \n File "/tmp/ansible_deploy_helper_payload_fucausf0/", line 499, in main\n File "/tmp/ansible_deploy_helper_payload_fucausf0/", line 357, in create_path\n File "/usr/lib/python3.8/", 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

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: