~alpine/users

3 3

Rsync in chrooted ssh in alpine docker image result in failed to set permissions

François Lachèse <francois.lachese@gmail.com>
Details
Message ID
<CAD1pQ_ZPp59rN-zuC6fDfBSavpkE6OJcWsd5Fcogx7MV3ETM0A@mail.gmail.com>
DKIM signature
missing
Download raw message
Hello,

I use an alpine docker image with openssh and rsync installed.
If I try to rsync to the container, everything is working fine with
default ssh configuration.

As soon as I try to chroot the user and after copying bins and library
to the user directory I get errors.
for exemple :

rsync -a -e 'ssh -p 2222' /home/user/Pictures/ localhost:/backups/071120

gives

rsync: failed to set permissions on "/backups/071120/.Screenshot from
2019-12-26 13-47-24.png.NKoiaj": No such file or directory (2)

I tried the same configuration and rsync command with a ubuntu base
image and it works so I guess there is something different with the
Alpine image.

Any idea of what it could be ?

Thanks,
François
Paul Bredbury <brebs@sent.com>
Details
Message ID
<43a6b9394aa9126e5ef7c4b617e5371428594242.camel@sent.com>
In-Reply-To
<CAD1pQ_ZPp59rN-zuC6fDfBSavpkE6OJcWsd5Fcogx7MV3ETM0A@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
On Sat, 2020-11-07 at 17:46 +0100, François Lachèse wrote:
> As soon as I try to chroot the user and after copying bins and library
> to the user directory I get errors.

Check the user and group numbers in /etc/passwd, which are different between e.g. Ubuntu and Alpine.
Andrej Kacian <andrej@kacian.sk>
Details
Message ID
<20201107180111.400b784e@penny>
In-Reply-To
<CAD1pQ_ZPp59rN-zuC6fDfBSavpkE6OJcWsd5Fcogx7MV3ETM0A@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
On Sat, 7 Nov 2020 17:46:13 +0100
François Lachèse wrote:

> No such file or directory (2)

Try adding -s to your rsync call. Perhaps there is a difference in how
different remote shells (bash vs. ash) interact with rsync when it
comes to file names with spaces in them.

Regards,
-- 
Andrej

Re: Rsync in chrooted ssh in alpine docker image result in failed, to set permissions

François Lachèse <francois.lachese@gmail.com>
Details
Message ID
<63a99fd2-9ab2-9118-9850-94298555c627@gmail.com>
In-Reply-To
<CAD1pQ_ZPp59rN-zuC6fDfBSavpkE6OJcWsd5Fcogx7MV3ETM0A@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
Thank you both for the help


Paul Bredbury wrote :
> Check the user and group numbers in /etc/passwd, which are different between e.g. Ubuntu and Alpine.

I used the same passwd file for both

Andrej Kacian wrote :

> Try adding -s to your rsync call. Perhaps there is a difference in how
> different remote shells (bash vs. ash) interact with rsync when it
> comes to file names with spaces in them.


I can't find -s in the rsync man... I replaced ash with bash as the user shell in my alpine image but the issue is still there.
Reply to thread Export thread (mbox)