# Rsync with module problem



## jbo (Feb 18, 2016)

I installed net/rsync on two identical FreeBSD 10.2 machines using `pkg`. One will act as "the server" and the other will act as "the client".
The server is running `rsyncd` and with the following configuration file:

```
pid file = /var/run/rsyncd.pid

uid = nobody
gid = nobody
use chroot = no
max connections = 4

[foo]
        path = /usr/local/backup/foo
```

My problem is that I get the following error message when try to copy a file to the server:

```
$ rsync -avz file.txt user@my.server.com::foo
sending incremental file list
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.2]
```
When querying the server it returns a list of the modules as well as a list of the files/directories of a specific module without any problem.

Any ideas?
I can rsync files using the path directly without any problems.


----------



## Jeckt (Feb 18, 2016)

By default rsync shares are read only. Did you forget to set readonly = false ?


----------



## jbo (Feb 19, 2016)

Oh yes, that was indeed the problem!
Thank you very much, Sir!


----------

