Docker-sync: Error on syncing symlinks with rsync? error code 95

Created on 21 Oct 2016  路  11Comments  路  Source: EugenMayer/docker-sync

I got this error when run docker-sync-stack start using rsync, on many files :
rsync: failed to set permissions on "front/bin/phpmd" (in volume): Not supported (95)
rsync: failed to set permissions on "admin/bin/phpunit" (in volume): Not supported (95)

After investigating, i found that this happened when the files caused the error are symlinks. If i exclude these files from syncing or remove the symlinks, everything works fine.

bug help wanted incomplete

Most helpful comment

you could try including -L within the sync_args options of the docker-sync.yml

From the rsync docs: "When symlinks are encountered, the item that they point to (the referent) is copied, rather than the symlink."

There are also other options to attempt if you check -l, -L, -k and -K on this page: https://linux.die.net/man/1/rsync

All 11 comments

Are you syncing your node_modules?

@EugenMayer : no, i use nearly default configuration as here and do not have node_modules in my projects. It happens with some files generated by PHP Composer (see link below)
files with symlinks

please check if those binaries are compiled binaries, if yes, they might be symlinks on your OSX to a different location and if synced, they do not accists.

"Not supported" is most probably an issue that the symlink is simply broken on the container, please also see the issue queue for issues like https://github.com/EugenMayer/docker-sync/issues/143

you could try including -L within the sync_args options of the docker-sync.yml

From the rsync docs: "When symlinks are encountered, the item that they point to (the referent) is copied, rather than the symlink."

There are also other options to attempt if you check -l, -L, -k and -K on this page: https://linux.die.net/man/1/rsync

thanks @anthwinter , it works well with -L arg.

@trungtnm have you tried to delete a file and see if it gets removed in the container? Because that is not the case for me :)

@kallehauge yes, this is the issue with symlinks :). I think you can try with --delete arg.

That's brilliant @trungtnm - I didn't even think of that :smile:

Yes delete is not used with rsync intentionally, because there are too many edge cases. If you want to use delete, you should thing about using unison not rsync as a strategy.

Is this issue still open actually, or did you solve it by now?

Yes, it resolved! I will close this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

YouriT picture YouriT  路  4Comments

tiefenb picture tiefenb  路  6Comments

derschatta picture derschatta  路  8Comments

hammady picture hammady  路  6Comments

brucemead picture brucemead  路  3Comments