GNU bug report logs - #41806
rsync service broken (uid, "files" module)

Previous Next

Package: guix;

Reported by: Pierre Neidhardt <mail <at> ambrevar.xyz>

Date: Thu, 11 Jun 2020 14:59:02 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41806 in the body.
You can then email your comments to 41806 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#41806; Package guix. (Thu, 11 Jun 2020 14:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pierre Neidhardt <mail <at> ambrevar.xyz>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 11 Jun 2020 14:59:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: bug-guix <at> gnu.org
Subject: rsync service broken (uid, "files" module)
Date: Thu, 11 Jun 2020 16:57:53 +0200
[Message part 1 (text/plain, inline)]
A few things are not working with the Guix rsync service:

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

--8<---------------cut here---------------start------------->8---
# 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
--8<---------------cut here---------------end--------------->8---

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

--8<---------------cut here---------------start------------->8---
rsync ... $HOST/files ... # The "files" here matters!
--8<---------------cut here---------------end--------------->8---

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

--8<---------------cut here---------------start------------->8---
(service rsync-service-type
            (rsync-configuration
             (uid "ambrevar")
             (gid "users")
             (share-path "/whatever")
             (read-only? #t)))
--8<---------------cut here---------------end--------------->8---

I get this on guix reconfigure:

--8<---------------cut here---------------start------------->8---
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
--8<---------------cut here---------------end--------------->8---

Cheers!

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#41806; Package guix. (Sun, 30 Jul 2023 13:32:02 GMT) Full text and rfc822 format available.

Message #8 received at 41806 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 41806 <at> debbugs.gnu.org
Subject: Re: bug#41806: rsync service broken (uid, "files" module)
Date: Sun, 30 Jul 2023 09:31:28 -0400
Hello,

Pierre Neidhardt <mail <at> ambrevar.xyz> writes:

> 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".")

> 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




Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Sun, 30 Jul 2023 13:33:02 GMT) Full text and rfc822 format available.

Notification sent to Pierre Neidhardt <mail <at> ambrevar.xyz>:
bug acknowledged by developer. (Sun, 30 Jul 2023 13:33:02 GMT) Full text and rfc822 format available.

Message #13 received at 41806-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 41806-done <at> debbugs.gnu.org
Subject: Re: bug#41806: rsync service broken (uid, "files" module)
Date: Sun, 30 Jul 2023 09:32:42 -0400
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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 28 Aug 2023 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 242 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.