You are not logged in.

#1 2020-06-29 08:18:19

Fomalhaut
Member
Registered: 2020-06-29
Posts: 8

rsyncd chroot failed

I'm using 2 laptops, both of them running arch linux. When I try to transfer files from one to another with rsync, it failed.

journalctl -xe | grep "rsync" on server outputs:

rsync: [Receiver] chroot /home/***/shared failed: No such file or directory (2)

but this directory exists, with permission 777, and owner is nobody.

this is /etc/rsyncd.conf

uid = nobody
gid = nobody
use chroot = yes
max connections = 4
syslog facility = local5
pid file = /run/rsyncd.pid
address = 10.0.0.1

[shared]
	path = /home/***/shared
	comment = shared folder

when I disable "use chroot", the error is "chdir failed".

How can I fix it?
thanks.

I have searched on web but I found nothing.

Last edited by Fomalhaut (2020-06-29 08:19:03)

Offline

#2 2020-06-29 08:44:02

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 1,933
Website

Re: rsyncd chroot failed

Did you redact the original folder name here or is the directory name actually '***'?
In the latter case, you should consider renaming the folder, since the asterisk might cause troubles as it's commonly being used as a globbing character.

The next thing would be to test, whether the user nobody can actually access the given folder.
If the specified path is a subdir of another user's home directory, this is most likely not the case.

Offline

#3 2020-06-29 15:07:03

Fomalhaut
Member
Registered: 2020-06-29
Posts: 8

Re: rsyncd chroot failed

schard wrote:

Did you redact the original folder name here or is the directory name actually '***'?
In the latter case, you should consider renaming the folder, since the asterisk might cause troubles as it's commonly being used as a globbing character.

The next thing would be to test, whether the user nobody can actually access the given folder.
If the specified path is a subdir of another user's home directory, this is most likely not the case.

I tried another directory, but I got same error again. In this case, all ancestor directories are accessible.

Offline

#4 2020-06-29 15:23:51

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 1,933
Website

Re: rsyncd chroot failed

You cannot get the same error, if you changed the directory, since the path should subsequently have changed.
Post some actual information like full configuration and log files and directory permissions.

Offline

#5 2020-06-29 17:29:01

Fomalhaut
Member
Registered: 2020-06-29
Posts: 8

Re: rsyncd chroot failed

schard wrote:

You cannot get the same error, if you changed the directory, since the path should subsequently have changed.
Post some actual information like full configuration and log files and directory permissions.

full configuration had been posted above, except username.

journalctl -xe | grep "rsync"

6月 29 15:27:40 fomalhaut audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=rsyncd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
6月 29 15:27:40 fomalhaut rsyncd[2620]: rsyncd version 3.2.1 starting, listening on port 873
6月 29 15:27:43 fomalhaut rsyncd[2623]: name lookup failed for 10.0.0.2: Name or service not known
6月 29 15:27:43 fomalhaut rsyncd[2623]: connect from UNKNOWN (10.0.0.2)
6月 29 15:27:43 fomalhaut rsyncd[2623]: rsync allowed access on module shared from UNKNOWN (10.0.0.2)
6月 29 15:27:43 fomalhaut rsyncd[2623]: rsync: [Receiver] chroot /home/fomalhaut/shared failed: No such file or directory (2)

Offline

Board footer

Powered by FluxBB