Roots Discourse

Deploy failure due to web/apps/uploads

I am trying to deploy to my production site and am getting the following error. I reprovisioned, but the error persists. I was able to deploy fine before but it has been a couple of months since I have deployed.

My local path is: local_path: …/site

Thanks for any advice on this!

Here is the error message:

MODULE FAILURE
See stdout/stderr for the exact error
Traceback (most recent call last):
File “”, line 113, in
File “”, line 105, in _ansiballz_main
File “”, line 48, in invoke_module
File “/tmp/ansible_file_payload_DGpc0R/main.py”, line 863, in
File “/tmp/ansible_file_payload_DGpc0R/main.py”, line 849, in main
File “/tmp/ansible_file_payload_DGpc0R/main.py”, line 568, in
ensure_directory
File “/tmp/ansible_file_payload_DGpc0R/ansible_file_payload.zip/ansible/mod
ule_utils/basic.py”, line 1547, in set_fs_attributes_if_different
File “/tmp/ansible_file_payload_DGpc0R/ansible_file_payload.zip/ansible/mod
ule_utils/basic.py”, line 1314, in set_mode_if_different
OSError: [Errno 1] Operation not permitted: ‘/srv/www/example.com/shared/uploads’

The full traceback is:
Traceback (most recent call last):
File “”, line 113, in
File “”, line 105, in _ansiballz_main
File “”, line 48, in invoke_module
File “/tmp/ansible_file_payload_DGpc0R/main.py”, line 863, in
File “/tmp/ansible_file_payload_DGpc0R/main.py”, line 849, in main
File “/tmp/ansible_file_payload_DGpc0R/main.py”, line 568, in ensure_directory
File “/tmp/ansible_file_payload_DGpc0R/ansible_file_payload.zip/ansible/module_utils/basic.py”, line 1547, in set_fs_attributes_if_different
File “/tmp/ansible_file_payload_DGpc0R/ansible_file_payload.zip/ansible/module_utils/basic.py”, line 1314, in set_mode_if_different
OSError: [Errno 1] Operation not permitted: ‘/srv/www/example.com/shared/uploads’

failed: [159.65.90.244] (item={‘path’: ‘web/app/uploads’, ‘src’: ‘uploads’}) => {
“changed”: false,
“item”: {
“path”: “web/app/uploads”,
“src”: “uploads”
},
“module_stdout”: “”,
“rc”: 1
}

Have you normally provisioned (server playbook) the server before?
Can you provision the server now and then try again deploying?

Have you checked the owner and permissions of /srv/www/example.com and /srv/www/example.com/shared, /srv/www/example.com/shared/uploads:
Is it owned by user web and writable by owner/user?

Thank you. It was a permissions issue with the uploads folder. I ran

sudo chown -R web:www-data uploads

and that fixed it.