Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I meshed up with my rsync on linux. When I am restating it, its showing me following error:

sudo /etc/init.d/rsync restart

/etc/rsyncd.conf: line 13: [ftp]: command not found
/etc/rsyncd.conf: line 15: comment: command not found
/etc/rsyncd.conf: line 16: path: command not found
/etc/rsyncd.conf: line 17: use: command not found
/etc/rsyncd.conf: line 19: lock: command not found

/etc/rsyncd.conf: line 21: read: `=': not a valid identifier
/etc/rsyncd.conf: line 22: list: command not found
/etc/rsyncd.conf: line 23: uid: command not found
/etc/rsyncd.conf: line 24: gid: command not found
/etc/rsyncd.conf: line 31: strict: command not found
/etc/rsyncd.conf: line 34: ignore: command not found
/etc/rsyncd.conf: line 35: ignore: command not found
/etc/rsyncd.conf: line 36: transfer: command not found
timeout: invalid time interval `='
Try `timeout --help' for more information.
/etc/rsyncd.conf: line 39: refuse: command not found
/etc/rsyncd.conf: line 40: dont: command not found

I know it should consider taking echo parameter in /etc/rsync.conf file but its interpreting them as command.


vim /etc/rsyncd.conf

# for pid file, do not use /var/run/rsync.pid if
# you are going to run rsync out of the init.d script.
# pid file=/var/run/rsyncd.pid
#syslog facility=daemon
#socket options=



        comment = public archive
        path = /var/www/pub
        use chroot = yes
#       max connections=10
        lock file = /var/lock/rsyncd
# the default for read only is yes...
        read only = yes
        list = yes
        uid = nobody
        gid = nogroup
#       exclude = 
#       exclude from = 
#       include =
#       include from =
#       auth users = 
#       secrets file = /etc/rsyncd.secrets
        strict modes = yes
#       hosts allow =
#       hosts deny =
        ignore errors = no
        ignore nonreadable = yes
        transfer logging = no
#       log format = %t: host %h (%a) %o %f (%l bytes). Total %b bytes.
        timeout = 600
        refuse options = checksum dry-run
        dont compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz


The vim /etc/init.d/rsync .

share|improve this question
It would help if you described the changes that you performed on /etc/init.d/rsync script. – dkaragasidis Apr 7 '13 at 19:00
Your startup script is trying to run /etc/rsync.conf as a shell script instead of reading it as a list of options. Please post your /etc/init.d/rsync script, as that is most likely the source of your problem. – Jenny D Apr 8 '13 at 9:42
this file is pretty big,please check pastebin link in update – Subhransu Mishra Apr 8 '13 at 13:12
The /etc/init.d/rsync file you posted looks very similar to mine (which works). What happens when you run rsync -v --daemon --config "/etc/rsync.conf"? – palswim Mar 5 '15 at 1:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.