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

Relative symlinks messed up after being rsynced #85

Closed
kylehendricks opened this issue Aug 2, 2016 · 17 comments · Fixed by EugenMayer/docker-image-rsyncd#6
Closed

Relative symlinks messed up after being rsynced #85

kylehendricks opened this issue Aug 2, 2016 · 17 comments · Fixed by EugenMayer/docker-image-rsyncd#6
Assignees
Labels
Milestone

Comments

@kylehendricks
Copy link

I have a relative symlink in my source directory at abc/symlink1 and it points to ../def/symlink1. After I start docker-sync and inspect the rsync container (and my container) my symlink now points to /rsynd-munged/../def/symlink1

Does munge symlinks need to be turned off?

@EugenMayer
Copy link
Owner

@kylehendricks am i right, that --munge-links can by used as a rsync parameter, not only as a server parameter?

Beside we have to thing about the issues (probably) with --munge-links , you could add this for you using the sync_args https://github.com/EugenMayer/docker-sync/blob/master/example/docker-sync.yml#L36 for now

Does this help you for now?

@kylehendricks
Copy link
Author

It looks like the version of rsync on my mac is 2.6.9 which doesn't support the --munge-symlinks (or --no-munge-symlinks?).

I also saw there is an rsync argument --remote-option that I could have used to possibly send --no-munge-links to the daemon but that is also not supported on the version of rsync on my mac.

@EugenMayer
Copy link
Owner

@kylehendricks install a better rsync version using brew brew install rsync its worth it anyway

those are the options there

  -L, --copy-links            transform symlink into referent file/dir
            --copy-unsafe-links     only "unsafe" symlinks are transformed
            --safe-links            ignore symlinks that point outside the tree
            --munge-links           munge symlinks to make them safer

@kylehendricks
Copy link
Author

Updated rsync to 3.1.2 and tried passing --no-munge-links and -M--no-munge-links. Still get munging.

@kylehendricks
Copy link
Author

I ended up working around this by doing sync_args='-L' but I'm guessing it would make sense to turn off link munging on the rsync docker.

@EugenMayer
Copy link
Owner

-L resolves the symlinks to files, not keeping them as symlinks. Thats not what you want most probably.

Do your symlink point at a point the the synced data or on the outer dest-container filesystem?

Nevertheless, we neither use chroot, or anything else. I am not able to see how we can fix this server side for now, feel free to enlighten me :)

@kylehendricks
Copy link
Author

The symlinks are pointed at data within the volume itself.

Supposedly you can add munge symlinks = no in rsyncd.conf to disable it.

On Tue, Aug 2, 2016, 18:26 Eugen Mayer [email protected] wrote:

-L resolves the symlinks to files, not keeping them as symlinks. Thats not
what you want most probably.

Do your symlink point at a point the the synced data or on the outer
dest-container filesystem?

Nevertheless, we neither use chroot, or anything else. I am not able to
see how we can fix this server side for now, feel free to enlighten me :)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#85 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA77xvg2u3kTBzlnsglnYBW63lfZ-RI5ks5qb8QdgaJpZM4JatES
.

@EugenMayer
Copy link
Owner

ah, is it enabled by default? If yes, this makes a lot of sense

@EugenMayer EugenMayer added this to the 0.1.0 milestone Aug 4, 2016
@EugenMayer EugenMayer self-assigned this Aug 4, 2016
@kylehendricks
Copy link
Author

Here's what the doc says.

"The default is disabled when "use chroot" is on and the inside-chroot path
is "/", otherwise it is enabled."

On Thu, Aug 4, 2016, 03:42 Eugen Mayer [email protected] wrote:

ah, is it enabled by default? If yes, this makes a lot of sense


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#85 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA77xj4dIVRwEhmwcVBEbJmCMm8cgtiXks5qcZftgaJpZM4JatES
.

@EugenMayer
Copy link
Owner

https://github.com/EugenMayer/docker-image-rsyncd/blob/master/run#L36 well we have use chroot = no so it should be enabled. Got you on this, created EugenMayer/docker-image-rsyncd#5 will be released soon. Thank for the effort / patience!

@EugenMayer
Copy link
Owner

implemented and fixed with the new rsync image

@thinkspill
Copy link

I'm still seeing munged symlinks. Has this new rsync image been released? Just loaded today, I have an image apparently created 3 weeks ago, while this fix was in just 2 weeks ago:

eugenmayer/rsync           latest              e55b4cffcdec        3 weeks ago         7.366 MB

Is there a different image available including this fix, or otherwise, when do you expect this to be released?

Thanks!

@EugenMayer
Copy link
Owner

Hi, if it happened, not by intention.

At least looking on the docker-file https://github.com/EugenMayer/docker-image-rsyncd/blob/master/run#L39 the setting should be there. Not sure what potentially could be wrong. If you like, bull that repo and build the image locally - does it work for you then?

@EugenMayer EugenMayer reopened this Aug 24, 2016
@thinkspill
Copy link

Yes, building it locally fixes it. It looks like the Docker Hub image just hasn't been updated with the latest.

@EugenMayer
Copy link
Owner

Very odd, i ll try to repush it ASAP, thank you!

@EugenMayer
Copy link
Owner

@thinkspill just pushed a new image - please delete your local image using docker rmi eugenmayer/rsync and then start docker-sync or docker-sync-stack - does this work now?

@EugenMayer EugenMayer modified the milestones: 0.1.2, 0.1.0 Aug 30, 2016
@EugenMayer
Copy link
Owner

as far as i tested it, it works know

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

Successfully merging a pull request may close this issue.

3 participants