After an upgrade from Debian 10 to 11 an rsync job with some destination in /etc does not work anymore.

On the server (destination) side I have this:

uid = root
gid = root

hosts allow = mysender

  # NOGO
  path = /etc/tmp

  # GO
  # path = /root/tmp

  comment = Just for testing
  read only = false

On the client side (source) I enter this command:

rsync -a /etc/temp/test myserver::mymodule

Which makes rsync fail with this message:

rsync: [generator] recv_generator: mkdir "/test" (in mymodule) failed: Read-only file system (30)
*** Skipping any contents from this failed directory ***
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]

Configuring the server to use a path outside of /etc (for example /root/tmp) does work as expected.

The root file system (which also contains the /etc directory) is not mounted read-only of course and it is clean. Why does rsyncd consider /etc being part of a read-only file system then?

  • 1
    You do have the /etc/tmp target directory? It's an unusual path Commented Nov 1, 2021 at 17:03
  • 1
    Yes. I know it is unusual but it is just for testing.
    – felix
    Commented Nov 1, 2021 at 18:40
  • Are you running SELinux Commented Nov 1, 2021 at 19:59
  • 1
    No SELinux, neither on server nor on client.
    – felix
    Commented Nov 1, 2021 at 20:44

1 Answer 1


rsync Version 3.2.0-1 introduced an enhancement called "ProtectSystem" that prevents, among other things, write access to /etc (see https://download.samba.org/pub/rsync/NEWS). This can be overridden by creating a file /etc/systemd/system/rsync.service.d/override.conf with the following contents:


Hope, that helps so long after your initial post.

  • Thanks a lot! This solves my problem. I should have read the comments in /lib/systemd/system/rsync.service.
    – felix
    Commented Dec 23, 2021 at 16:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .