https://bugzilla.samba.org/show_bug.cgi?id=13207
Bug ID: 13207
Summary: rsyncd doesn't send output of failed pre-xfer exec
script to client
Product: rsync
Version: 3.1.1
Hardware: x64
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: core
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Hello,
The rsyncd.conf documentation says:
>If the pre-xfer exec command fails, the transfer is aborted before it begins.
>Any output from the script on stdout (up to several KB) will be displayed to
>the user when aborting, but is NOT displayed if the script returns success.
However, i can't actually get it to do this. In fact, i don't get any
meaningful output at all.
My pre-xfer script:
#!/bin/sh
echo $RSYNC_HOST_ADDR
return 1
My rsyncd.conf:
[testing]
path = /home/dana
read only = true
pre-xfer exec = /home/dana/rsync.sh
The client command and its output:
% rsync -vvvv --debug=all 172.17.66.1::testing/foo .
opening tcp connection to 172.17.66.1 port 873
sending daemon args: --server --sender -vvvve.LsfxC --debug=ALL . testing/foo
(6 args)
(Client) Protocol versions: remote=31, negotiated=31
rsync: read error: Connection reset by peer (54)
rsync error: error in socket IO (code 10) at io.c(785) [Receiver=3.1.2]
[Receiver] _exit_cleanup(code=10, file=io.c, line=785): about to call exit(10)
The rsyncd log output:
2018-01-09 12:25:45 rsyncd[7770]: connect from myhostname (172.17.66.100)
2018-01-09 12:25:45 rsyncd[7770]: rsync on testing/foo from myhostname
(172.17.66.100)
2018-01-09 12:25:45 rsyncd[7770]: pre-xfer exec returned failure (256):
2018-01-09 12:25:45 rsyncd[7770]: 172.17.66.100
2018-01-09 12:25:46 rsyncd[7770]: rsync error: requested action not supported
(code 4) at clientserver.c(973) [sender=3.1.1]
As you can see, i get the script output in the log — but not on the client
side.
The server side is running rsync 3.1.1 on Ubuntu 16.04. I have tried launching
`rsync --daemon` manually, just to make sure that systemd wasn't interfering
with the I/O somehow, and it did the same thing.
The client side is running rsync 3.1.2 on macOS 10.12. I also tested 3.1.1 from
the same machine as the server and again got the same result.
Am i doing something wrong? Is there some prerequisite for seeing this output?
(If so, it might be helpful to mention it in the documentation.)
Thanks!
--
You are receiving this mail because:
You are the QA Contact for the bug.
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html