rsync service broken (uid, "files" module)

  • Done
  • quality assurance status badge
Details
2 participants
  • Pierre Neidhardt
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Pierre Neidhardt
Severity
normal
P
P
Pierre Neidhardt wrote on 11 Jun 2020 16:57
(address . bug-guix@gnu.org)
87r1ul3b0u.fsf@ambrevar.xyz
A few things are not working with the Guix rsync service:

1. A "files" module is created by default:

Toggle snippet (17 lines)
# Generated by 'rsync-service'.

pid file = /var/run/rsyncd/rsyncd.pid
lock file = /var/run/rsyncd/rsyncd.lock
log file = /var/log/rsyncd.log
port = 873
use chroot = true
uid = rsyncd
gid = rsyncd

[files]
path = /srv/rsyncd
comment = Rsync share
read only = false
timeout = 300

But rsync-configuration does not allow the user to specify another
module name, nor to add a module. This is limiting.

Furthermore, the default module name is not documented, so one has to
guess that the client must invoke

Toggle snippet (3 lines)
rsync ... $HOST/files ... # The "files" here matters!

2. The `uid' option does not work. With the following configuration

Toggle snippet (8 lines)
(service rsync-service-type
(rsync-configuration
(uid "ambrevar")
(gid "users")
(share-path "/whatever")
(read-only? #t)))

I get this on guix reconfigure:

Toggle snippet (13 lines)
building /gnu/store/lvkplmcxr785x56022hm8d88x0fbpd0m-switch-to-system.scm.drv...
making '/gnu/store/v01y64gg1wbvg5jk3xgsci04rgvfy6sv-system' the current system...
setting up setuid programs in '/run/setuid-programs'...
populating /etc from /gnu/store/5pwh48vkd4yhjc29iq6mxnh7jgd4nnmh-etc...
Backtrace:
1 (primitive-load "/home/ambrevar/.config/guix/current/bin/guix")
In guix/ui.scm:
1945:12 0 (run-guix-command _ . _)

guix/ui.scm:1945:12: In procedure run-guix-command:
In procedure getpw: entry not found

Cheers!

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl7iRnEACgkQm9z0l6S7
zH+y4Af/U1mOGr7XZhgJ2ARkVa/qENyOqfBMzGuJloNmv5YGIQb0WXdjSxnRQgky
R3bOlJm/qCtqES2R1JDRlv8vOyu/uVrHDfq59gxTZOFnDJhcnJ4FHolVI3ybfyhD
NFQc6qcUe3k6SlYR4D4IMmYC+kCjs1VHx/Eg5kEilM+PeNcpgyU/6KnMy+X9Q9Au
rtfBCo0Y7qOl52uXwJLCQOBTJGrKnDTDSyUgOSV5T8HyuEH6sHsH6tbXfS3oArZK
g+eouRe5ff68XtUIfpuG5tsiA7iZ6tkB0A4aWXshcen9Mc7pySMGm7ZTOFEr3WkK
DDrmg9NmnbKpye8H1s7XdPMkP0XUJA==
=4BkF
-----END PGP SIGNATURE-----

M
M
Maxim Cournoyer wrote on 30 Jul 2023 15:31
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 41806@debbugs.gnu.org)
87cz09sez3.fsf@gmail.com
Hello,

Pierre Neidhardt <mail@ambrevar.xyz> writes:

Toggle quote (24 lines)
> A few things are not working with the Guix rsync service:
>
> 1. A "files" module is created by default:
>
> # Generated by 'rsync-service'.
>
> pid file = /var/run/rsyncd/rsyncd.pid
> lock file = /var/run/rsyncd/rsyncd.lock
> log file = /var/log/rsyncd.log
> port = 873
> use chroot = true
> uid = rsyncd
> gid = rsyncd
>
> [files]
> path = /srv/rsyncd
> comment = Rsync share
> read only = false
> timeout = 300
>
>
> But rsync-configuration does not allow the user to specify another
> module name, nor to add a module. This is limiting.

I think this was fixed by Ludovic in
c9d92409d4d3f587f73c6f48f845a913f7278ad1 ("services: rsync: Allow
configuring several rsync "modules".")

Toggle quote (30 lines)
> Furthermore, the default module name is not documented, so one has to
> guess that the client must invoke
>
> rsync ... $HOST/files ... # The "files" here matters!
>
>
> 2. The `uid' option does not work. With the following configuration
>
> (service rsync-service-type
> (rsync-configuration
> (uid "ambrevar")
> (gid "users")
> (share-path "/whatever")
> (read-only? #t)))
>
>
> I get this on guix reconfigure:
>
> building /gnu/store/lvkplmcxr785x56022hm8d88x0fbpd0m-switch-to-system.scm.drv...
> making '/gnu/store/v01y64gg1wbvg5jk3xgsci04rgvfy6sv-system' the current system...
> setting up setuid programs in '/run/setuid-programs'...
> populating /etc from /gnu/store/5pwh48vkd4yhjc29iq6mxnh7jgd4nnmh-etc...
> Backtrace:
> 1 (primitive-load "/home/ambrevar/.config/guix/current/bin/guix")
> In guix/ui.scm:
> 1945:12 0 (run-guix-command _ . _)
>
> guix/ui.scm:1945:12: In procedure run-guix-command:
> In procedure getpw: entry not found

Not sure what happened here; did a 'ambrevar' user already exist at the
time of reconfiguring? Are you able to reproduce that still?

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 30 Jul 2023 15:32
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 41806-done@debbugs.gnu.org)
878raxsex1.fsf@gmail.com
Hi,

I'll close it because it seems the main concern should have been fixed
with c9d92409d4d3f587f73c6f48f845a913f7278ad1, but please comment/reopen
if you still reproduce an issue.

--
Thanks,
Maxim
Closed
?