Hello, I am trying to configure rsyncd to mount destination encrypted FS (using EncFS) before syncing. In my rsyncd.conf : [test] path = /home/dest <...> pre-xfer exec = sleep 30 ; echo mypassword | encfs -S /home/ encrypteddir /home/dest ; sleep 30 (I have put "sleep 30" instructions just to make some tests) /home/encrypteddir is correctly mounted by rsyncd to /home/dest But rsyncd make a chdir() to /home/dest before executing pre-xfer. I can see that rsyncd is already in the folder before pre-xfer doing : lsof /home/dest So during syncing, rsyncd does not see the content of /home/ encrypteddir mounted, but the content of local /home/dest. Could it be possible to change this ? Could it be possible to force rsyncd to do the chdir() after pre-xfer ? Thank you very much, Best regards, AZ -------------- next part -------------- HTML attachment scrubbed and removed
On Wed, Nov 19, 2008 at 10:13:41PM +0100, AZ 9901 wrote:> Could it be possible to force rsyncd to do the chdir() after pre-xfer ?That is not currently possible because rsync wants to tell the pre-xfer process about the options that the client sent (such as what module is being requested), and that conversation happens after the chroot is all setup and the protocol data is already flowing. It might be possible to twiddle this, but it could be less secure, so I don't wish to change it. Your best bet is to make the root of the module a local dir and mount a subdir inside that local directory based on the pre-xfer data. ..wayne..
Maybe Matching Threads
- Regarding an "earlier" variant of `pre-xfer exec` [feature request and proposed patch]
- pre/post-xfer exec not executed ?
- DO NOT REPLY [Bug 4320] New: Daemon should send stdout, stderr of {pre, post}-xfer command to client
- [Bug 13207] New: rsyncd doesn't send output of failed pre-xfer exec script to client
- pre-xfer exec fails in FreeBSD