Permission problem while vagrant provision

Hello,

while running the vagrant provision, we get a strange error:

TASK [wordpress-install : Copy .env file into web root] ************************
System info:
  Ansible 2.0.2.0; Darwin
  Trellis at "Add Vagrant post up message"
---------------------------------------------------
rsync: chgrp "/srv/www/customer.com/current/.env" failed: Operation not
permitted (1)
rsync error: some files/attrs were not transferred (see previous errors)
(code 23) at main.c(1183) [sender=3.1.0]
failed: [default] (item=customer.com) => {"changed": false, "cmd": ["rsync", "-ac", "--info=NAME", "/tmp/customer.com.env", "/srv/www/customer.com/current/.env"], "delta": "0:00:00.045547", "end": "2016-08-04 09:54:12.726818", "failed": true, "item": "customer.com", "rc": 23, "start": "2016-08-04 09:54:12.681271", "stderr": "rsync: chgrp \"/srv/www/customer.com/current/.env\" failed: Operation not permitted (1)\nrsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.0]", "stdout": "", "stdout_lines": [], "warnings": ["Consider using synchronize module rather than running rsync"]}
 [WARNING]: Consider using synchronize module rather than running rsync

When I navigate on my host machine to the sites folder, the group has been changed to ā€œ_lpoperatorā€ recursively for all files.

I only found this info for that case: http://serverfault.com/questions/656172/rsync-on-os-x-changes-folders-group-name-to-lpoperator

Does somebody have an idea what vould be wrong with trellis / ansible / vagrant?

Thank you!

Looks like you may need to remove the -a flag on your rsync command so that group idā€™s arenā€™t synced between the two machines.

It was a problem with the user. The wrong linux-user was in the development config files (users.yml)

I recieved a similar error:

non-zero return code
rsync: rename "/srv/www/wootest.com/current/.env.tGiyqe" -> ".env": Operation
not permitted (1)
rsync error: some files/attrs were not transferred (see previous errors)
(code 23) at main.c(1196) [sender=3.1.2]
failed: [default] (item=wootest.com) => {"changed": true, "cmd": ["rsync", "-ac", "--info=NAME", "/tmp/wootest.com.env", "/srv/www/wootest.com/current/.env"], "delta": "0:00:00.011952", "end": "2019-12-01 21:22:16.054752", "item": {"key": "wootest.com", "value": {"admin_email": "admin@example.test", "cache": {"enabled": false}, "local_path": "../site", "multisite": {"enabled": false}, "site_hosts": [{"canonical": "woo.test", "redirects": ["www.woo.test"]}], "ssl": {"enabled": false, "provider": "self-signed"}}}, "rc": 23, "start": "2019-12-01 21:22:16.042800", "stderr_lines": ["rsync: rename \"/srv/www/wootest.com/current/.env.tGiyqe\" -> \".env\": Operation not permitted (1)", "rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]"], "stdout": "wootest.com.env", "stdout_lines": ["wootest.com.env"]}

I SSH into vagrant and couldnā€™t find the file ā€˜.env.tGiyqeā€™ but instead found the ā€˜.envā€™ file. I deleted the .env file and then ran vagrant provision. This worked!

1 Like