Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chown doesn't work #51

Open
pyronaur opened this issue Dec 7, 2017 · 3 comments
Open

chown doesn't work #51

pyronaur opened this issue Dec 7, 2017 · 3 comments

Comments

@pyronaur
Copy link

pyronaur commented Dec 7, 2017

Got this error:

[14:47:09] gulp-rsync: zsh:1: no matches found: --usermap=*:www-data --groupmap=*:www-data
[14:47:09] gulp-rsync:  [14:47:09] gulp-rsync: rsync: connection unexpectedly closed (0 bytes received so far) [sender]
[14:47:09] gulp-rsync:  [14:47:09] gulp-rsync: rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.2]

From:
Mac OS X Sierra, rsync 3.1.2

To:
Ubuntu 16.04, rsync 3.1.0

Tried config like this
chown: 'www-data:www-data',
and this:
chown: '"www-data:www-data"',

I'm syncing as root, so I'm fairly certain I have permissions. No idea what do do about this.

@d79
Copy link

d79 commented May 28, 2018

That would probably be because, as said here, rsync needs the parameter -og to use --chown.
I was able to make it work enabling the archive option.
Maybe it would be better to add by default the parameter -og if chown is used (and probably -p for chmod).

@nh2
Copy link

nh2 commented Dec 13, 2022

I found the answer, it's an rsync bug fixed in 3.2.4 or 3.2.5:

https://stackoverflow.com/questions/68588173/rsync-to-remote-location-exits-with-code-12/74791196#74791196

I would post this also on ansible/ansible#64971 but unfortunately they use the software engineering anti-pattern of locking issues so they likely will never learn of the answer 😥

@gslin
Copy link

gslin commented Apr 6, 2023

Usually adding -s can solve this issue, from rsync manpage:

If you specify "--chown=foo:bar", this is exactly the same as specifying "--usermap=:foo --groupmap=:bar", only easier. If your shell complains about the wildcards, use --protect-args (-s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants