rsync server on SCO 5.0.,7 - SCO

This is a discussion on rsync server on SCO 5.0.,7 - SCO ; I want to rsync files to one SCO 5.0.7 server(host) from 3 others (remote). .I have installed the latest rsync from aljex.com. on all servers. I want to run the rsync daemon on the host server. I created the /etc/rsynd.conf ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: rsync server on SCO 5.0.,7

  1. rsync server on SCO 5.0.,7

    I want to rsync files to one SCO 5.0.7 server(host) from 3 others
    (remote). .I have installed the latest rsync from aljex.com. on all
    servers. I want to run the rsync daemon on the host server. I created
    the /etc/rsynd.conf file, I modified /etc/inetd.conf to run the rsync
    daemon. I ran "/etc/init.d/rsyncd enable" and "/etc/init.d/rsyncd
    start". I just don't think the daemon is running. I do not see it in
    the list of running processes. When I try to run rsync commands from a
    remote server, it connects, asks me for a password (it appears to be
    using ssh) and then fails with the following:

    sh: rsync: not found
    rsync: connection unexpectedly closed (0 bytes received so far)
    [receiver]
    rsync error: error in rsync protocol data stream (code 12) at
    io.c(600) [receiver=3.0.0]

    Have I missed a step somewhere?

    My rsyncd.log on the host server looks like this:

    2008/09/10 21:06:37 [11201] rsyncd version 3.0.0 starting, listening
    on port 873
    2008/09/10 21:06:37 [11201] bind() failed: Address already in use
    (address-family 2)
    2008/09/10 21:06:37 [11201] unable to bind any inbound sockets on port
    873
    2008/09/10 21:06:37 [11201] rsync error: error in socket IO (code 10)
    at socket.c(535) [receiver=3.0.0]
    2008/09/10 21:07:17 [11205] rsyncd version 3.0.0 starting, listening
    on port 873
    2008/09/10 21:07:17 [11205] bind() failed: Address already in use
    (address-family 2)
    2008/09/10 21:07:17 [11205] unable to bind any inbound sockets on port
    873
    2008/09/10 21:07:17 [11205] rsync error: error in socket IO (code 10)
    at socket.c(535) [receiver=3.0.0]
    2008/09/10 21:41:58 [11305] rsyncd version 3.0.0 starting, listening
    on port 873
    2008/09/10 21:41:58 [11305] bind() failed: Address already in use
    (address-family 2)
    2008/09/10 21:41:58 [11305] unable to bind any inbound sockets on port
    873
    2008/09/10 21:41:58 [11305] rsync error: error in socket IO (code 10)
    at socket.c(535) [receiver=3.0.0]
    2008/09/10 21:43:13 [11318] rsyncd version 3.0.0 starting, listening
    on port 873
    2008/09/10 21:43:13 [11318] bind() failed: Address already in use
    (address-family 2)
    2008/09/10 21:43:13 [11318] unable to bind any inbound sockets on port
    873
    2008/09/10 21:43:13 [11318] rsync error: error in socket IO (code 10)
    at socket.c(535) [receiver=3.0.0]
    2008/09/10 21:58:11 [710] rsyncd version 3.0.0 starting, listening on
    port 873
    2008/09/10 21:58:11 [710] bind() failed: Address already in use
    (address-family 2)
    2008/09/10 21:58:11 [710] unable to bind any inbound sockets on port
    873
    2008/09/10 21:58:11 [710] rsync error: error in socket IO (code 10) at
    socket.c(535) [receiver=3.0.0]

    My rsyncd.conf looks like this:

    motd file = /etc/rsyncd.motd
    log file = /usr/adm/rsyncd.log
    pid file = /usr/adm/rsyncd.pid
    lock file = /usr/adm/rsync.lock

    [rsync_files_directory]
    path = /am/rsync
    comment = rsync server
    uid = nobody
    gid = nobody
    read only = no
    list = yes
    auth users = root
    # hosts allow = ap2 dev ap1
    secrets file = /etc/rsyncd.scrt

    /etc/inetd.conf line looks like this:

    rsync stream tcp nowait root /usr/local/bin/rsync rsyncd --
    daemon

  2. Re: rsync server on SCO 5.0.,7

    AB wrote:
    > I want to rsync files to one SCO 5.0.7 server(host) from 3 others
    > (remote). .I have installed the latest rsync from aljex.com. on all
    > servers. I want to run the rsync daemon on the host server. I created
    > the /etc/rsynd.conf file, I modified /etc/inetd.conf to run the rsync
    > daemon. I ran "/etc/init.d/rsyncd enable" and "/etc/init.d/rsyncd
    > start". I just don't think the daemon is running. I do not see it in
    > the list of running processes. When I try to run rsync commands from a
    > remote server, it connects, asks me for a password (it appears to be
    > using ssh) and then fails with the following:


    Do *not* modify inetd.conf *and* run the init script. Pick one or the other.

    Also, you need to use a command like this to verify that it's working:

    rsync rsync://serversystem/

    Notice the different syntax from 'rsync user@hostname:/[dirname]/

    > sh: rsync: not found
    > rsync: connection unexpectedly closed (0 bytes received so far)
    > [receiver]
    > rsync error: error in rsync protocol data stream (code 12) at
    > io.c(600) [receiver=3.0.0]
    >
    > Have I missed a step somewhere?
    >
    > My rsyncd.log on the host server looks like this:
    >
    > 2008/09/10 21:06:37 [11201] rsyncd version 3.0.0 starting, listening
    > on port 873
    > 2008/09/10 21:06:37 [11201] bind() failed: Address already in use
    > (address-family 2)
    > 2008/09/10 21:06:37 [11201] unable to bind any inbound sockets on port
    > 873
    > 2008/09/10 21:06:37 [11201] rsync error: error in socket IO (code 10)
    > at socket.c(535) [receiver=3.0.0]
    > 2008/09/10 21:07:17 [11205] rsyncd version 3.0.0 starting, listening
    > on port 873
    > 2008/09/10 21:07:17 [11205] bind() failed: Address already in use
    > (address-family 2)
    > 2008/09/10 21:07:17 [11205] unable to bind any inbound sockets on port
    > 873
    > 2008/09/10 21:07:17 [11205] rsync error: error in socket IO (code 10)
    > at socket.c(535) [receiver=3.0.0]
    > 2008/09/10 21:41:58 [11305] rsyncd version 3.0.0 starting, listening
    > on port 873
    > 2008/09/10 21:41:58 [11305] bind() failed: Address already in use
    > (address-family 2)
    > 2008/09/10 21:41:58 [11305] unable to bind any inbound sockets on port
    > 873
    > 2008/09/10 21:41:58 [11305] rsync error: error in socket IO (code 10)
    > at socket.c(535) [receiver=3.0.0]
    > 2008/09/10 21:43:13 [11318] rsyncd version 3.0.0 starting, listening
    > on port 873
    > 2008/09/10 21:43:13 [11318] bind() failed: Address already in use
    > (address-family 2)
    > 2008/09/10 21:43:13 [11318] unable to bind any inbound sockets on port
    > 873
    > 2008/09/10 21:43:13 [11318] rsync error: error in socket IO (code 10)
    > at socket.c(535) [receiver=3.0.0]
    > 2008/09/10 21:58:11 [710] rsyncd version 3.0.0 starting, listening on
    > port 873
    > 2008/09/10 21:58:11 [710] bind() failed: Address already in use
    > (address-family 2)
    > 2008/09/10 21:58:11 [710] unable to bind any inbound sockets on port
    > 873
    > 2008/09/10 21:58:11 [710] rsync error: error in socket IO (code 10) at
    > socket.c(535) [receiver=3.0.0]
    >
    > My rsyncd.conf looks like this:
    >
    > motd file = /etc/rsyncd.motd
    > log file = /usr/adm/rsyncd.log
    > pid file = /usr/adm/rsyncd.pid
    > lock file = /usr/adm/rsync.lock
    >
    > [rsync_files_directory]
    > path = /am/rsync
    > comment = rsync server
    > uid = nobody
    > gid = nobody
    > read only = no
    > list = yes
    > auth users = root
    > # hosts allow = ap2 dev ap1
    > secrets file = /etc/rsyncd.scrt
    >
    > /etc/inetd.conf line looks like this:
    >
    > rsync stream tcp nowait root /usr/local/bin/rsync rsyncd --
    > daemon


  3. Re: rsync server on SCO 5.0.,7

    AB wrote:
    > I want to rsync files to one SCO 5.0.7 server(host) from 3 others
    > (remote). .I have installed the latest rsync from aljex.com. on all
    > servers. I want to run the rsync daemon on the host server. I created
    > the /etc/rsynd.conf file, I modified /etc/inetd.conf to run the rsync
    > daemon. I ran "/etc/init.d/rsyncd enable" and "/etc/init.d/rsyncd
    > start". I just don't think the daemon is running. I do not see it in
    > the list of running processes. When I try to run rsync commands from a
    > remote server, it connects, asks me for a password (it appears to be
    > using ssh) and then fails with the following:
    >
    > sh: rsync: not found
    > rsync: connection unexpectedly closed (0 bytes received so far)
    > [receiver]
    > rsync error: error in rsync protocol data stream (code 12) at
    > io.c(600) [receiver=3.0.0]
    >
    > Have I missed a step somewhere?
    >
    > My rsyncd.log on the host server looks like this:
    >
    > 2008/09/10 21:06:37 [11201] rsyncd version 3.0.0 starting, listening
    > on port 873
    > 2008/09/10 21:06:37 [11201] bind() failed: Address already in use
    > (address-family 2)
    > 2008/09/10 21:06:37 [11201] unable to bind any inbound sockets on port
    > 873
    > 2008/09/10 21:06:37 [11201] rsync error: error in socket IO (code 10)
    > at socket.c(535) [receiver=3.0.0]
    > 2008/09/10 21:07:17 [11205] rsyncd version 3.0.0 starting, listening
    > on port 873
    > 2008/09/10 21:07:17 [11205] bind() failed: Address already in use
    > (address-family 2)
    > 2008/09/10 21:07:17 [11205] unable to bind any inbound sockets on port
    > 873
    > 2008/09/10 21:07:17 [11205] rsync error: error in socket IO (code 10)
    > at socket.c(535) [receiver=3.0.0]
    > 2008/09/10 21:41:58 [11305] rsyncd version 3.0.0 starting, listening
    > on port 873
    > 2008/09/10 21:41:58 [11305] bind() failed: Address already in use
    > (address-family 2)
    > 2008/09/10 21:41:58 [11305] unable to bind any inbound sockets on port
    > 873
    > 2008/09/10 21:41:58 [11305] rsync error: error in socket IO (code 10)
    > at socket.c(535) [receiver=3.0.0]
    > 2008/09/10 21:43:13 [11318] rsyncd version 3.0.0 starting, listening
    > on port 873
    > 2008/09/10 21:43:13 [11318] bind() failed: Address already in use
    > (address-family 2)
    > 2008/09/10 21:43:13 [11318] unable to bind any inbound sockets on port
    > 873
    > 2008/09/10 21:43:13 [11318] rsync error: error in socket IO (code 10)
    > at socket.c(535) [receiver=3.0.0]
    > 2008/09/10 21:58:11 [710] rsyncd version 3.0.0 starting, listening on
    > port 873
    > 2008/09/10 21:58:11 [710] bind() failed: Address already in use
    > (address-family 2)
    > 2008/09/10 21:58:11 [710] unable to bind any inbound sockets on port
    > 873
    > 2008/09/10 21:58:11 [710] rsync error: error in socket IO (code 10) at
    > socket.c(535) [receiver=3.0.0]
    >
    > My rsyncd.conf looks like this:
    >
    > motd file = /etc/rsyncd.motd
    > log file = /usr/adm/rsyncd.log
    > pid file = /usr/adm/rsyncd.pid
    > lock file = /usr/adm/rsync.lock
    >
    > [rsync_files_directory]
    > path = /am/rsync
    > comment = rsync server
    > uid = nobody
    > gid = nobody
    > read only = no
    > list = yes
    > auth users = root
    > # hosts allow = ap2 dev ap1
    > secrets file = /etc/rsyncd.scrt
    >
    > /etc/inetd.conf line looks like this:
    >
    > rsync stream tcp nowait root /usr/local/bin/rsync rsyncd --
    > daemon


    I'm confused - are you saying that one 5.0.7 box is the Host version of
    Openserver, or that you want that box to be the rsync host for the group?

    If it is NOT the Enterprise version of Openserver, you don't have a
    TCP-IP stack.

    --
    ----------------------------------------------------
    Pat Welch, UBB Computer Services, a WCS Affiliate
    SCO Authorized Partner
    Microlite BackupEdge Certified Reseller
    Unix/Linux/Windows/Hardware Sales/Support
    (209) 745-1401 Cell: (209) 251-9120
    E-mail: patubb@inreach.com
    ----------------------------------------------------

  4. Re: rsync server on SCO 5.0.,7


    ----- Original Message -----
    From: "AB"
    Newsgroups: comp.unix.sco.misc
    To:
    Sent: Wednesday, September 10, 2008 10:30 PM
    Subject: rsync server on SCO 5.0.,7


    >I want to rsync files to one SCO 5.0.7 server(host) from 3 others
    > (remote). .I have installed the latest rsync from aljex.com. on all
    > servers. I want to run the rsync daemon on the host server. I created
    > the /etc/rsynd.conf file, I modified /etc/inetd.conf to run the rsync
    > daemon. I ran "/etc/init.d/rsyncd enable" and "/etc/init.d/rsyncd
    > start". I just don't think the daemon is running. I do not see it in
    > the list of running processes. When I try to run rsync commands from a
    > remote server, it connects, asks me for a password (it appears to be
    > using ssh) and then fails with the following:
    >
    > sh: rsync: not found
    > rsync: connection unexpectedly closed (0 bytes received so far)
    > [receiver]
    > rsync error: error in rsync protocol data stream (code 12) at
    > io.c(600) [receiver=3.0.0]
    >
    > Have I missed a step somewhere?
    >
    > My rsyncd.log on the host server looks like this:
    >
    > 2008/09/10 21:06:37 [11201] rsyncd version 3.0.0 starting, listening
    > on port 873
    > 2008/09/10 21:06:37 [11201] bind() failed: Address already in use
    > (address-family 2)
    > 2008/09/10 21:06:37 [11201] unable to bind any inbound sockets on port
    > 873
    > 2008/09/10 21:06:37 [11201] rsync error: error in socket IO (code 10)
    > at socket.c(535) [receiver=3.0.0]
    > 2008/09/10 21:07:17 [11205] rsyncd version 3.0.0 starting, listening
    > on port 873
    > 2008/09/10 21:07:17 [11205] bind() failed: Address already in use
    > (address-family 2)
    > 2008/09/10 21:07:17 [11205] unable to bind any inbound sockets on port
    > 873
    > 2008/09/10 21:07:17 [11205] rsync error: error in socket IO (code 10)
    > at socket.c(535) [receiver=3.0.0]
    > 2008/09/10 21:41:58 [11305] rsyncd version 3.0.0 starting, listening
    > on port 873
    > 2008/09/10 21:41:58 [11305] bind() failed: Address already in use
    > (address-family 2)
    > 2008/09/10 21:41:58 [11305] unable to bind any inbound sockets on port
    > 873
    > 2008/09/10 21:41:58 [11305] rsync error: error in socket IO (code 10)
    > at socket.c(535) [receiver=3.0.0]
    > 2008/09/10 21:43:13 [11318] rsyncd version 3.0.0 starting, listening
    > on port 873
    > 2008/09/10 21:43:13 [11318] bind() failed: Address already in use
    > (address-family 2)
    > 2008/09/10 21:43:13 [11318] unable to bind any inbound sockets on port
    > 873
    > 2008/09/10 21:43:13 [11318] rsync error: error in socket IO (code 10)
    > at socket.c(535) [receiver=3.0.0]
    > 2008/09/10 21:58:11 [710] rsyncd version 3.0.0 starting, listening on
    > port 873
    > 2008/09/10 21:58:11 [710] bind() failed: Address already in use
    > (address-family 2)
    > 2008/09/10 21:58:11 [710] unable to bind any inbound sockets on port
    > 873
    > 2008/09/10 21:58:11 [710] rsync error: error in socket IO (code 10) at
    > socket.c(535) [receiver=3.0.0]
    >
    > My rsyncd.conf looks like this:
    >
    > motd file = /etc/rsyncd.motd
    > log file = /usr/adm/rsyncd.log
    > pid file = /usr/adm/rsyncd.pid
    > lock file = /usr/adm/rsync.lock
    >
    > [rsync_files_directory]
    > path = /am/rsync
    > comment = rsync server
    > uid = nobody
    > gid = nobody
    > read only = no
    > list = yes
    > auth users = root
    > # hosts allow = ap2 dev ap1
    > secrets file = /etc/rsyncd.scrt
    >
    > /etc/inetd.conf line looks like this:
    >
    > rsync stream tcp nowait root /usr/local/bin/rsync rsyncd --
    > daemon


    You're sort of mixing up 3 things there.

    Which do you want?
    1 rsync over rsh?
    2 rsync over ssh?
    3 native rsync?
    4 native rsync via inetd?

    1) rsync over rsh
    * requires rsync binary on the server and command line options to specify rsh "-e rcmd"
    * does not require any rsync config or secrets files
    * must not have line in inetd.conf
    * client rsync command line uses single colon
    * client rsync command line uses either an absolute path, or a path relative to the users home dir on the server (not a module)
    * user and pass are a unix user on the server, just like telnet/ftp/etc...

    2) rsync over ssh
    * all same as for rsh, with following exceptions/additions:
    * requires ssh server on the server and ssh client on the client (old versions don't have it and may not be easy to add)
    * no -e option necessry since "-e ssh" is the default on the recent builds. originally I used to make "-e rcmd" the compiled-in default for osr5 builds because back then ssh was not built-in and sometimes not easy to add, but rcmd has been built-in forever, and enabled by default, and so it "works out of the box" even without any actual rhosts user equivalency set up (just rquires manually entering the password each time)

    3) native rsync
    * requires rsync binary on the servser (running in daemon mode)
    * requires rsynd.conf and rsyncd.secrets
    * must not have line in inetd.conf
    * client command line uses double colon
    * client command line uses module + path relative to, or within, module, as defined in rsyncd.conf on server
    * user and pass are only from rsyncd.secrets on server and utterly unrelated to any unix user (/etc/passwd) on server

    4) native rsync via inetd.conf
    * should be about the same as native rsync, except adding the need to configure /etc/inetd.conf and /etc/services
    * I never even tried this once. The man-page allows for the possibility of launching via inetd, but I don't know what would be the right inetd config for rsync, so I don't know if the line you have is a good one.

    I personally use native rsync extensively. Between many osr5 boxes from osr504 to 507, and numerous 32 and 64 bit linux versions and freebsd and sparc solaris.

    The supplied start script works, as long as the rsync binary itself works and as long as you haven't supplied bad config files. The compiled-in defaults work with other sco boxes that have the same the same package installed for at least the last few versions until 3 or more versions ago when I stopped overriding the default of "ssh" for remote-shell.

    In any event, all compiled-in defaults can be overridden with command line options anyways. They are just a convenience to make manually entered commands as simple as possible.

    There are numerous reasons why the service may fail to start up the first time you ever try.
    The two most common are:
    1) you didnt supply the necessary dependancies as stated on the web page where you got the package. (oss646c)
    on 5.0.7 you shouldn't need to supply anything.
    2) something wrong with config file.

    So, on the server, fist just get the binary working at all (the daemon is the same binary, once it runs at all, then the daemon works also, although you still need to have a sane config file).

    On the server, what do these do?

    rsync --version
    ldd /usr/local/bin/rsync

    Also, your error logs indicate that the binary is probably able to run ok, since it runs far enough to discover that inetd is already occupying the tcp port it wants.

    So:

    * comment out the line in inetd.conf
    * restart inetd
    * ps -ef |grep sync and kill any pid's for any rsync processes
    * netstat -an |grep 873 and verify that nothing is listening on 873
    * move the secrets file, uid, gid lines to the global section of rsyncd.conf (maybe the way you have it is legal, I just never did that and we want to start with a working config, then try to get fancy from there.)
    * chown nobody:nobody /am/rsync, or chmod 777 /am/rsync, or chgrp nobody /am/rsync AND chmod 775 /am/rsync, etc... In other words, arrange, however you like, that your specified uid and gid can write to /am/rsync.
    * not required but suggest changing the module name to something short, since you have to type it in on ever rsync command line from the clients, change [rsync_files_directory] to [am]
    * verify that /etc/rsyncd.scrt has at least one line "root:something"
    * start rsync: /etc/init.d/rsync start
    * netstat -an |grep 873 and verify rsync is now listening
    * go to remote (but still on the lan) box and:

    touch /tmp/foo
    rsync -av /tmp/foo server::am

    (answer "something" to the password prompt)
    If you were not logged in as root then use:
    rsync -av /tmp/foo root@server::am

    That syntax used the native/direct rsync, and the config changes I specified should have set up a working standalone rsync daemon without inetd.

    You can still use rsync via rsh(rcmd) and ssh at the same time, as long as the rsh and ssh servers are runing on the server and you have rsh & ssh clients on the client. rcmd is the only one of those garanteed to be there even on older osr5, and by default it's still enabled in inetd.conf, so from the clients you could also run:

    rsync -av /tmp/foo server:/am/rsync
    rsync -av -e rcmd /tmp/foo server:/am/rsync

    Those will only work for root, because the target directory is only writeable by nobody, and nobody cannot log in via rcmd or ssh. Unless you did chmod 777 /am/rsync.

    note: although the client will use your login name by default if you don't supply a user, that's the limit of the relationship between the /etc/passwd users on either box and rsync. On the server, "root" is merely an arbitrary, non-special name like any other name that you invent and place in rsyncd.secrets, or rsyncd.scrt in your case, I also advise against using an odd name like that until _after_ you are so familiar with rsync that you can handle the fact that all dirctions and scripts will be assuming a file name that isn't true for you.

    Bleh, rsync has so many options and possible interactions that I could describe things forever, which the man-page already does. I'm stopping here pretty much at random. Probably should have just supplied a simple working config that has nothing to do with your intended config, and you can read the manual and try to deviate from there.

    --
    Brian K. White brian@aljex.com http://www.myspace.com/KEYofR
    +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
    filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!


  5. Re: rsync server on SCO 5.0.,7

    On Sep 11, 11:05*am, "Brian K. White" wrote:
    > ----- Original Message -----
    > From: "AB"
    >
    > Newsgroups: comp.unix.sco.misc
    > To:
    > Sent: Wednesday, September 10, 2008 10:30 PM
    > Subject: rsync server on SCO 5.0.,7
    >
    > >I want to rsync files to one SCO 5.0.7 server(host) from 3 others
    > > (remote). .I have installed the latest rsync from aljex.com. on all
    > > servers. I want to run the rsync daemon on the host server. I created
    > > the /etc/rsynd.conf file, I modified /etc/inetd.conf to run the rsync
    > > daemon. I ran "/etc/init.d/rsyncd enable" and "/etc/init.d/rsyncd
    > > start". I just don't think the daemon is running. I do not see it in
    > > the list of running processes. When I try to run rsync commands from a
    > > remote server, it connects, asks me for a password (it appears to be
    > > using ssh) and then fails with the following:

    >
    > > sh: rsync: not found
    > > rsync: connection unexpectedly closed (0 bytes received so far)
    > > [receiver]
    > > rsync error: error in rsync protocol data stream (code 12) at
    > > io.c(600) [receiver=3.0.0]

    >
    > > Have I missed a step somewhere?

    >
    > > My rsyncd.log on the host server looks like this:

    >
    > > 2008/09/10 21:06:37 [11201] rsyncd version 3.0.0 starting, listening
    > > on port 873
    > > 2008/09/10 21:06:37 [11201] bind() failed: Address already in use
    > > (address-family 2)
    > > 2008/09/10 21:06:37 [11201] unable to bind any inbound sockets on port
    > > 873
    > > 2008/09/10 21:06:37 [11201] rsync error: error in socket IO (code 10)
    > > at socket.c(535) [receiver=3.0.0]
    > > 2008/09/10 21:07:17 [11205] rsyncd version 3.0.0 starting, listening
    > > on port 873
    > > 2008/09/10 21:07:17 [11205] bind() failed: Address already in use
    > > (address-family 2)
    > > 2008/09/10 21:07:17 [11205] unable to bind any inbound sockets on port
    > > 873
    > > 2008/09/10 21:07:17 [11205] rsync error: error in socket IO (code 10)
    > > at socket.c(535) [receiver=3.0.0]
    > > 2008/09/10 21:41:58 [11305] rsyncd version 3.0.0 starting, listening
    > > on port 873
    > > 2008/09/10 21:41:58 [11305] bind() failed: Address already in use
    > > (address-family 2)
    > > 2008/09/10 21:41:58 [11305] unable to bind any inbound sockets on port
    > > 873
    > > 2008/09/10 21:41:58 [11305] rsync error: error in socket IO (code 10)
    > > at socket.c(535) [receiver=3.0.0]
    > > 2008/09/10 21:43:13 [11318] rsyncd version 3.0.0 starting, listening
    > > on port 873
    > > 2008/09/10 21:43:13 [11318] bind() failed: Address already in use
    > > (address-family 2)
    > > 2008/09/10 21:43:13 [11318] unable to bind any inbound sockets on port
    > > 873
    > > 2008/09/10 21:43:13 [11318] rsync error: error in socket IO (code 10)
    > > at socket.c(535) [receiver=3.0.0]
    > > 2008/09/10 21:58:11 [710] rsyncd version 3.0.0 starting, listening on
    > > port 873
    > > 2008/09/10 21:58:11 [710] bind() failed: Address already in use
    > > (address-family 2)
    > > 2008/09/10 21:58:11 [710] unable to bind any inbound sockets on port
    > > 873
    > > 2008/09/10 21:58:11 [710] rsync error: error in socket IO (code 10) at
    > > socket.c(535) [receiver=3.0.0]

    >
    > > My rsyncd.conf looks like this:

    >
    > > motd file = /etc/rsyncd.motd
    > > log file = /usr/adm/rsyncd.log
    > > pid file = /usr/adm/rsyncd.pid
    > > lock file = /usr/adm/rsync.lock

    >
    > > [rsync_files_directory]
    > > * * * *path = /am/rsync
    > > * * * *comment = rsync server
    > > * * * *uid = nobody
    > > * * * *gid = nobody
    > > * * * *read only = no
    > > * * * *list = yes
    > > * * * *auth users = root
    > > # * * *hosts allow = ap2 dev ap1
    > > * * * *secrets file = /etc/rsyncd.scrt

    >
    > > /etc/inetd.conf line looks like this:

    >
    > > rsync * stream *tcp * * nowait *root * */usr/local/bin/rsync rsyncd --
    > > daemon

    >
    > You're sort of mixing up 3 things there.
    >
    > Which do you want?
    > 1 rsync over rsh?
    > 2 rsync over ssh?
    > 3 native rsync?
    > 4 native rsync via inetd?
    >
    > 1) rsync over rsh
    > * requires rsync binary on the server and command line options to specifyrsh "-e rcmd"
    > * does not require any rsync config or secrets files
    > * must not have line in inetd.conf
    > * client rsync command line uses single colon
    > * client rsync command line uses either an absolute path, or a path relative to the users home dir on the server (not a module)
    > * user and pass are a unix user on the server, just like telnet/ftp/etc....
    >
    > 2) rsync over ssh
    > * all same as for rsh, with following exceptions/additions:
    > * requires ssh server on the server and ssh client on the client (old versions don't have it and may not be easy to add)
    > * no -e option necessry since "-e ssh" is the default on the recent builds. originally I used to make "-e rcmd" the compiled-in default for osr5 builds because back then ssh was not built-in and sometimes not easy to add, but rcmd has been built-in forever, and enabled by default, and so it "worksout of the box" even without any actual rhosts user equivalency set up (just rquires manually entering the password each time)
    >
    > 3) native rsync
    > * requires rsync binary on the servser (running in daemon mode)
    > * requires rsynd.conf and rsyncd.secrets
    > * must not have line in inetd.conf
    > * client command line uses double colon
    > * client command line uses module + path relative to, or within, module, as defined in rsyncd.conf on server
    > * user and pass are only from rsyncd.secrets on server and utterly unrelated to any unix user (/etc/passwd) on server
    >
    > 4) native rsync via inetd.conf
    > * should be about the same as native rsync, except adding the need to configure /etc/inetd.conf and /etc/services
    > * I never even tried this once. The man-page allows for the possibility of launching via inetd, but I don't know what would be the right inetd config for rsync, so I don't know if the line you have is a good one.
    >
    > I personally use native rsync extensively. Between many osr5 boxes from osr504 to 507, and numerous 32 and 64 bit linux versions and freebsd and sparc solaris.
    >
    > The supplied start script works, as long as the rsync binary itself worksand as long as you haven't supplied bad config files. The compiled-in defaults work with other sco boxes that have the same the same package installed for at least the last few versions until 3 or more versions ago when I stopped overriding the default of "ssh" for remote-shell.
    >
    > In any event, all compiled-in defaults can be overridden with command line options anyways. They are just a convenience to make manually entered commands as simple as possible.
    >
    > There are numerous reasons why the service may fail to start up the firsttime you ever try.
    > The two most common are:
    > 1) you didnt supply the necessary dependancies as stated on the web page where you got the package. (oss646c)
    > on 5.0.7 you shouldn't need to supply anything.
    > 2) something wrong with config file.
    >
    > So, on the server, fist just get the binary working at all (the daemon isthe same binary, once it runs at all, then the daemon works also, althoughyou still need to have a sane config file).
    >
    > On the server, what do these do?
    >
    > rsync --version
    > ldd /usr/local/bin/rsync
    >
    > Also, your error logs indicate that the binary is probably able to run ok, since it runs far enough to discover that inetd is already occupying the tcp port it wants.
    >
    > So:
    >
    > * comment out the line in inetd.conf
    > * restart inetd
    > * ps -ef |grep sync and kill any pid's for any rsync processes
    > * netstat -an |grep 873 and verify that nothing is listening on 873
    > * move the secrets file, uid, gid lines to the global section of rsyncd.conf (maybe the way you have it is legal, I just never did that and we want to start with a working config, then try to get fancy from there.)
    > * chown nobody:nobody /am/rsync, or chmod 777 /am/rsync, or chgrp nobody /am/rsync AND chmod 775 /am/rsync, etc... In other words, arrange, however you like, that your specified uid and gid can write to /am/rsync.
    > * not required but suggest changing the module name to something short, since you have to type it in on ever rsync command line from the clients, change [rsync_files_directory] to [am]
    > * verify that /etc/rsyncd.scrt has at least one line "root:something"
    > * start rsync: /etc/init.d/rsync start
    > * netstat -an |grep 873 and verify rsync is now listening
    > * go to remote (but still on the lan) box and:
    >
    > touch /tmp/foo
    > rsync -av /tmp/foo server::am
    >
    > (answer "something" to the password prompt)
    > If you were not logged in as root then use:
    > rsync -av /tmp/foo root@server::am
    >
    > That syntax used the native/direct rsync, and the config changes I specified should have set up a working standalone rsync daemon without inetd.
    >
    > You can still use rsync via rsh(rcmd) and ssh at the same time, as long as the rsh and ssh servers are runing on the server and you have rsh & ssh clients on the client. rcmd is the only one of those garanteed to be there even on older osr5, and by default it's still enabled in inetd.conf, so fromthe clients you could also run:
    >
    > rsync -av /tmp/foo server:/am/rsync
    > rsync -av -e rcmd /tmp/foo server:/am/rsync
    >
    > Those will only work for root, because the target directory is only writeable by nobody, and nobody cannot log in via rcmd or ssh. Unless you did chmod 777 /am/rsync.
    >
    > note: although the client will use your login name by default if you don't supply a user, that's the limit of the relationship between the /etc/passwd users on either box and rsync. On the server, "root" is merely an arbitrary, non-special name like any other name that you invent and place in rsyncd.secrets, or rsyncd.scrt in your case, I also advise against using an oddname like that until _after_ you are so familiar with rsync that you can handle the fact that all dirctions and scripts will be assuming a file name that isn't true for you.
    >
    > Bleh, rsync has so many options and possible interactions that I could describe things forever, which the man-page already does. I'm stopping here pretty much at random. Probably should have just supplied a simple working config that has nothing to do with your intended config, and you can read the manual and try to deviate from there.
    >
    > --
    > Brian K. White * *br...@aljex.com * *http://www.myspace.com/KEYofR
    > +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
    > filePro *BBx * *Linux *SCO *FreeBSD * *#callahans *Satriani *Filk!- Hide quoted text -
    >
    > - Show quoted text -


    WOW - Thanks for the detailed response. I had already figured out most
    of what I was doing wrong and had eliminated the inetd method. I
    originally went down that path from reading a bunch of linux-related
    articles. I soon realized that your download gave me what I needed
    when I looked at the /etc/init.d/rsyncd script. Once I saw that it
    creates an S99 init script, I realized I wouldn't need the inetd.conf
    part. So I made some progress before going to sleep. "rsync
    rsync://rsync_server_name/" responds as it should. I will continue
    tonight and see if I can get it all working with native rsync first,
    then move on to rsync with ssh. I already have ssh implemented on all
    the servers, so that part is not an issue.

  6. Re: rsync server on SCO 5.0.,7

    I'm responding to the list because, well just because I guess you could say those are the only terms I'm offering for this kind of help at this time. As admittedly stuffy/snooty as that sounds. I'm willing to give away time and effort to everyone, or one person can pay for my time just for theirself.

    Except, since my company has way too much work for me for ourselves and our customers to ever assign me to a generic unix consult task like that, and since I don't moonlight, paying me is not actually an option after all.

    So, that just leaves the list, and sorry if you end up only getting what you pay for! heh.

    I don't want to remove most of this quoted stuff, but it's a lot, and my client failed to quote this reply, so look for a couple sections enclosed in "---bkw---" below almost at the bottom.

    ----- Original Message -----
    From: "AB"
    To: "Brian K. White"
    Sent: Thursday, September 11, 2008 8:17 PM
    Subject: Re: rsync server on SCO 5.0.,7


    On Sep 11, 11:05 am, "Brian K. White" wrote:
    > ----- Original Message -----
    > From: "AB"
    >
    > Newsgroups: comp.unix.sco.misc
    > To:
    > Sent: Wednesday, September 10, 2008 10:30 PM
    > Subject: rsync server on SCO 5.0.,7
    >
    > >I want to rsync files to one SCO 5.0.7 server(host) from 3 others
    > > (remote). .I have installed the latest rsync from aljex.com. on all
    > > servers. I want to run the rsync daemon on the host server. I created
    > > the /etc/rsynd.conf file, I modified /etc/inetd.conf to run the rsync
    > > daemon. I ran "/etc/init.d/rsyncd enable" and "/etc/init.d/rsyncd
    > > start". I just don't think the daemon is running. I do not see it in
    > > the list of running processes. When I try to run rsync commands from a
    > > remote server, it connects, asks me for a password (it appears to be
    > > using ssh) and then fails with the following:

    >
    > > sh: rsync: not found
    > > rsync: connection unexpectedly closed (0 bytes received so far)
    > > [receiver]
    > > rsync error: error in rsync protocol data stream (code 12) at
    > > io.c(600) [receiver=3.0.0]

    >
    > > Have I missed a step somewhere?

    >
    > > My rsyncd.log on the host server looks like this:

    >
    > > 2008/09/10 21:06:37 [11201] rsyncd version 3.0.0 starting, listening
    > > on port 873
    > > 2008/09/10 21:06:37 [11201] bind() failed: Address already in use
    > > (address-family 2)
    > > 2008/09/10 21:06:37 [11201] unable to bind any inbound sockets on port
    > > 873
    > > 2008/09/10 21:06:37 [11201] rsync error: error in socket IO (code 10)
    > > at socket.c(535) [receiver=3.0.0]
    > > 2008/09/10 21:07:17 [11205] rsyncd version 3.0.0 starting, listening
    > > on port 873
    > > 2008/09/10 21:07:17 [11205] bind() failed: Address already in use
    > > (address-family 2)
    > > 2008/09/10 21:07:17 [11205] unable to bind any inbound sockets on port
    > > 873
    > > 2008/09/10 21:07:17 [11205] rsync error: error in socket IO (code 10)
    > > at socket.c(535) [receiver=3.0.0]
    > > 2008/09/10 21:41:58 [11305] rsyncd version 3.0.0 starting, listening
    > > on port 873
    > > 2008/09/10 21:41:58 [11305] bind() failed: Address already in use
    > > (address-family 2)
    > > 2008/09/10 21:41:58 [11305] unable to bind any inbound sockets on port
    > > 873
    > > 2008/09/10 21:41:58 [11305] rsync error: error in socket IO (code 10)
    > > at socket.c(535) [receiver=3.0.0]
    > > 2008/09/10 21:43:13 [11318] rsyncd version 3.0.0 starting, listening
    > > on port 873
    > > 2008/09/10 21:43:13 [11318] bind() failed: Address already in use
    > > (address-family 2)
    > > 2008/09/10 21:43:13 [11318] unable to bind any inbound sockets on port
    > > 873
    > > 2008/09/10 21:43:13 [11318] rsync error: error in socket IO (code 10)
    > > at socket.c(535) [receiver=3.0.0]
    > > 2008/09/10 21:58:11 [710] rsyncd version 3.0.0 starting, listening on
    > > port 873
    > > 2008/09/10 21:58:11 [710] bind() failed: Address already in use
    > > (address-family 2)
    > > 2008/09/10 21:58:11 [710] unable to bind any inbound sockets on port
    > > 873
    > > 2008/09/10 21:58:11 [710] rsync error: error in socket IO (code 10) at
    > > socket.c(535) [receiver=3.0.0]

    >
    > > My rsyncd.conf looks like this:

    >
    > > motd file = /etc/rsyncd.motd
    > > log file = /usr/adm/rsyncd.log
    > > pid file = /usr/adm/rsyncd.pid
    > > lock file = /usr/adm/rsync.lock

    >
    > > [rsync_files_directory]
    > > path = /am/rsync
    > > comment = rsync server
    > > uid = nobody
    > > gid = nobody
    > > read only = no
    > > list = yes
    > > auth users = root
    > > # hosts allow = ap2 dev ap1
    > > secrets file = /etc/rsyncd.scrt

    >
    > > /etc/inetd.conf line looks like this:

    >
    > > rsync stream tcp nowait root /usr/local/bin/rsync rsyncd --
    > > daemon

    >
    > You're sort of mixing up 3 things there.
    >
    > Which do you want?
    > 1 rsync over rsh?
    > 2 rsync over ssh?
    > 3 native rsync?
    > 4 native rsync via inetd?
    >
    > 1) rsync over rsh
    > * requires rsync binary on the server and command line options to specify rsh "-e rcmd"
    > * does not require any rsync config or secrets files
    > * must not have line in inetd.conf
    > * client rsync command line uses single colon
    > * client rsync command line uses either an absolute path, or a path relative to the users home dir on the server (not a module)
    > * user and pass are a unix user on the server, just like telnet/ftp/etc...
    >
    > 2) rsync over ssh
    > * all same as for rsh, with following exceptions/additions:
    > * requires ssh server on the server and ssh client on the client (old versions don't have it and may not be easy to add)
    > * no -e option necessry since "-e ssh" is the default on the recent builds. originally I used to make "-e rcmd" the compiled-in default for osr5 builds because back then ssh was not built-in and sometimes not easy to add, but rcmd has been built-in forever, and enabled by default, and so it "works out of the box" even without any actual rhosts user equivalency set up (just rquires manually entering the password each time)
    >
    > 3) native rsync
    > * requires rsync binary on the servser (running in daemon mode)
    > * requires rsynd.conf and rsyncd.secrets
    > * must not have line in inetd.conf
    > * client command line uses double colon
    > * client command line uses module + path relative to, or within, module, as defined in rsyncd.conf on server
    > * user and pass are only from rsyncd.secrets on server and utterly unrelated to any unix user (/etc/passwd) on server
    >
    > 4) native rsync via inetd.conf
    > * should be about the same as native rsync, except adding the need to configure /etc/inetd.conf and /etc/services
    > * I never even tried this once. The man-page allows for the possibility of launching via inetd, but I don't know what would be the right inetd config for rsync, so I don't know if the line you have is a good one.
    >
    > I personally use native rsync extensively. Between many osr5 boxes from osr504 to 507, and numerous 32 and 64 bit linux versions and freebsd and sparc solaris.
    >
    > The supplied start script works, as long as the rsync binary itself works and as long as you haven't supplied bad config files. The compiled-in defaults work with other sco boxes that have the same the same package installed for at least the last few versions until 3 or more versions ago when I stopped overriding the default of "ssh" for remote-shell.
    >
    > In any event, all compiled-in defaults can be overridden with command line options anyways. They are just a convenience to make manually entered commands as simple as possible.
    >
    > There are numerous reasons why the service may fail to start up the first time you ever try.
    > The two most common are:
    > 1) you didnt supply the necessary dependancies as stated on the web page where you got the package. (oss646c)
    > on 5.0.7 you shouldn't need to supply anything.
    > 2) something wrong with config file.
    >
    > So, on the server, fist just get the binary working at all (the daemon is the same binary, once it runs at all, then the daemon works also, although you still need to have a sane config file).
    >
    > On the server, what do these do?
    >
    > rsync --version
    > ldd /usr/local/bin/rsync
    >
    > Also, your error logs indicate that the binary is probably able to run ok, since it runs far enough to discover that inetd is already occupying the tcp port it wants.
    >
    > So:
    >
    > * comment out the line in inetd.conf
    > * restart inetd
    > * ps -ef |grep sync and kill any pid's for any rsync processes
    > * netstat -an |grep 873 and verify that nothing is listening on 873
    > * move the secrets file, uid, gid lines to the global section of rsyncd.conf (maybe the way you have it is legal, I just never did that and we want to start with a working config, then try to get fancy from there.)
    > * chown nobody:nobody /am/rsync, or chmod 777 /am/rsync, or chgrp nobody /am/rsync AND chmod 775 /am/rsync, etc... In other words, arrange, however you like, that your specified uid and gid can write to /am/rsync.
    > * not required but suggest changing the module name to something short, since you have to type it in on ever rsync command line from the clients, change [rsync_files_directory] to [am]
    > * verify that /etc/rsyncd.scrt has at least one line "root:something"
    > * start rsync: /etc/init.d/rsync start
    > * netstat -an |grep 873 and verify rsync is now listening
    > * go to remote (but still on the lan) box and:
    >
    > touch /tmp/foo
    > rsync -av /tmp/foo server::am
    >
    > (answer "something" to the password prompt)
    > If you were not logged in as root then use:
    > rsync -av /tmp/foo root@server::am
    >
    > That syntax used the native/direct rsync, and the config changes I specified should have set up a working standalone rsync daemon without inetd.
    >
    > You can still use rsync via rsh(rcmd) and ssh at the same time, as long as the rsh and ssh servers are runing on the server and you have rsh & ssh clients on the client. rcmd is the only one of those garanteed to be there even on older osr5, and by default it's still enabled in inetd.conf, so from the clients you could also run:
    >
    > rsync -av /tmp/foo server:/am/rsync
    > rsync -av -e rcmd /tmp/foo server:/am/rsync
    >
    > Those will only work for root, because the target directory is only writeable by nobody, and nobody cannot log in via rcmd or ssh. Unless you did chmod 777 /am/rsync.
    >
    > note: although the client will use your login name by default if you don't supply a user, that's the limit of the relationship between the /etc/passwd users on either box and rsync. On the server, "root" is merely an arbitrary, non-special name like any other name that you invent and place in rsyncd.secrets, or rsyncd.scrt in your case, I also advise against using an odd name like that until _after_ you are so familiar with rsync that you can handle the fact that all dirctions and scripts will be assuming a file name that isn't true for you.
    >
    > Bleh, rsync has so many options and possible interactions that I could describe things forever, which the man-page already does. I'm stopping here pretty much at random. Probably should have just supplied a simple working config that has nothing to do with your intended config, and you can read the manual and try to deviate from there.
    >
    > --
    > Brian K. White br...@aljex.com http://www.myspace.com/KEYofR
    > +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
    > filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!- Hide quoted text -
    >
    > - Show quoted text -



    Brian,

    Well, I got a little further, but still some issues. Below I have
    outlined my configuration and the result of various commands on the
    server and client. I feel like I'm close, but I've got too much
    information from too many sources, so I'm coming back to you. Any
    guidance will of course be greatly appreciated...


    # more /etc/rsyncd.conf

    motd file = /etc/rsyncd.motd
    log file = /usr/adm/rsyncd.log
    pid file = /usr/adm/rsyncd.pid
    lock file = /usr/adm/rsync.lock
    secrets file = /etc/rsyncd.scrt
    uid = rsyncusr
    gid = rsyncusr

    [rs_dev]
    path = /amer0/rsync/backup_dev
    comment = dev rsync files
    read only = no
    list = yes
    auth users = root rsyncusr

    [rs_ap2]

    path = /amer0/rsync/backup_ap2
    comment = ap2 rsync files
    read only = no
    list = yes
    authusers = root rsyncusr


    LISTING OF DIRECTORIES TO HOLD THE SYNC FILES:
    # ls -l /amer0/rsync

    total 4
    drwxrwxrwx 2 rsyncusr rsyncusr 512 Sep 10 20:42 backup_ap2
    drwxrwxrwx 2 rsyncusr rsyncusr 512 Sep 10 20:41 backup_dev


    # more /etc/rsyncd.scrt
    root:rsyncpassword
    rsyncusr:rsyncpassword



    # # netstat -an |grep 873

    tcp 0 0 *.873 *.*
    LISTEN


    ---bkw---

    The netstat commands only mattered in the context and in the specific order with the other commands I had posted.
    This here shows that something is listening on 873, but doesn't say what.

    The recipe I had posted was intended to establish this process:
    1 - kill, reconfigure, restart things until inetd is running and nothing is listening on 873.
    ie: kill any rsync procs, kill inetd, edit inetd.conf to exclude rsync, restart inetd since you need it, and verify after all that that nothing is listening on 873. This is a clean slate starting position we need to attain before proceeding with anything else. Loop forever here until you get this state of affairs.
    2 - at this point we want netstat -an NOT to show any 873.
    3 - make the various suggested config changes and run the rsync rc script.
    4 - at this point we want netstat -an TO show 873.

    ---bkw---


    # /usr/local/bin/rsync --version
    rsync version 3.0.0 protocol version 30
    Copyright (C) 1996-2007 by Andrew Tridgell, Wayne Davison, and others.
    Web site: http://rsync.samba.org/
    Capabilities:
    32-bit files, 32-bit inums, 32-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, no IPv6, batchfiles, inplace,
    append, no ACLs, no xattrs, iconv, no symtimes

    rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and
    you
    are welcome to redistribute it under certain conditions. See the GNU
    General Public Licence for details


    # ldd /usr/local/bin/rsync
    /usr/local/bin/rsync needs:
    /usr/lib/libsocket.so.2
    /usr/lib/libc.so.1


    FROM CLIENT:


    # /usr/local/bin/rsync rsync://ap11/

    rs_dev dev rsync files
    rs_ap2 ap2 rsync files


    # /usr/local/bin/rsync -av /tmp/foo ap11::rs_dev

    Password: (entered password in secrets file)

    @ERROR: auth failed on module rs_dev
    rsync error: error starting client-server protocol (code 5) at
    main.c(1536) [sender=3.0.0]


    --- bkw ---
    Since you specified uid and gid both = rsyncuser on the server, then the server needs a real unix user and group rsyncuser, and that user must have permission to write to /amer0/rsync/* (or any other path specified in any other module)
    Personally, I use rsync for just about all file transfers these days and maybe it's inadviseable security, but I have uid and gid = root in mine. This allows me to transfer files owned by any user and the ownership & permissions are preserved no matter where they are copied. I can backup some files from a sco system to a module on a linux backup server that doesn't even have those users, and restore them back to the same or other sco box, and nothing is lost.
    I'm not sure that's possible if the rsync server runs as any other user. Using chroot = true and ensuring no modul has a target path of "/" may close the potential security weakness.

    And, as per the log file below, the secrets file is too readable.
    chmod 600 /etc/rsyncd.secrets

    You have to restart rsync on the server after any rsyncd.conf changes.
    Unfortunately, /etc/init.d/rsyncd stop does not do anything, you have to manually ps -ef |grep sync and kill the rsync pid, then run /etc/init.d/rsyncd start again.
    This only applies to native rsync like above.
    --- bkw ---




    # /usr/local/bin/rsync -av /tmp/foo ap11:/amer0/rsync/backup_dev
    root@ap11's password: (entered root's real password)

    sh: rsync: not found
    rsync: connection unexpectedly closed (0 bytes received so far)
    [sender]
    rsync error: error in rsync protocol data stream (code 12) at
    io.c(600) [sender=3.0.0]


    ---bkw---
    When using the remote shell syntax (be it rcmd or ssh), you may need to tell the client a full path to the rsync binary on the server. By default rsync will log in to the other server via rcmd or ssh, as the specified user, and just try to run "rsync options..." over there to set up the other side of the connection. If the rsync binary is not in the default $PATH for rcmd or ssh logins for that user, then you can either add that path to PATH in /etc/profile and/or maybe in /etc/default/login or maybe even in SUPATH in /etc/default/su

    For sanity's sake I usually set almost the same PATH in all those, and in /etc/defult/cron* too, with the exception that SUPATH, root's ~/.profile, and /etc/default/cron all get ":/etc:/tcb/bin" added.

    (*) setting arbitrary stuff in /etc/default/cron requires oss642a on osr5 5.0.6 or lower. It's in 5.0.7 or higher natively. Unsure if PATH specifically requires the cron update or not since I think older versions did have a path statement.

    So, I have:

    /etc/default/login:
    PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/gnu/bin:/usr/gnu/sbin:/usr/local/bin:/usr/local/sbin:/u/appl/fp:/u/vsifax/bin:/u/aljex/bin:/u/aljex/start

    /etc/default/su:
    SUPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/gnu/bin:/usr/gnu/sbin:/usr/local/bin:/usr/local/sbin:/u/appl/fp:/u/vsifax/bin:/u/aljex/bin:/u/aljex/start:/etc:/tcb/bin

    /etc/defult/cron:
    setenv PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/gnu/bin:/usr/gnu/sbin:/usr/local/bin:/usr/local/sbin:/u/appl/fp:/u/vsifax/bin:/u/aljex/bin:/u/aljex/start:/etc:/tcb/bin

    /etc/profile:
    PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/gnu/bin:/usr/gnu/sbin:/usr/local/bin:/usr/local/sbin:/u/appl/fp:/u/vsifax/bin:/u/aljex/bin:/u/aljex/start
    export PATH

    /.profile:
    PATH=${PATH}:/etc:/tcb/bin

    And so, with rsync residing in /usr/local/bin, I don't need to specify the full path to rsync.

    Or, you could specify the full path to rsync on the server, via command line option on the client:

    /usr/local/bin/rsync -av --rsync-path=/usr/local/bin/rsync /tmp/foo ap11:/amer0/rsync/backup_dev
    ---bkw---


    RSYNCD.LOG FILE: (xxx.xxx.xxx.xxx replaces the actual IP of the
    client)

    # more /usr/adm/rsyncd.log
    2008/09/11 18:32:17 [23787] connect from dev (204.17.105.25)
    2008/09/11 18:32:24 [23787] secrets file must not be other-accessible
    (see stric
    t modes option)
    2008/09/11 18:32:24 [23787] continuing without secrets file
    2008/09/11 18:32:24 [23787] auth failed on module rs_dev from dev
    (204.17.105.25
    ): missing secret for user "root"


    ---bkw---
    For reference, my config looks like this: (this is for rsync 3.x, earlier versions are different)

    /etc/rsyncd.conf:
    uid = root
    gid = sys
    read only = false
    use chroot = true
    numeric ids = false
    munge symlinks = false
    #hosts allow = trusted.hosts
    transfer logging = true
    log format = %h %o %f %l %b
    log file = /var/log/rsyncd.log
    #pid file = /var/run/rsyncd.pid
    secrets file = /etc/rsyncd.secrets

    [foo]
    path = /path/to/foo
    auth users = foo


    /etc/rsyncd.secrets:
    foo:foopass


    rsync starting with 3.0.0 does some unwelcome junk to symlinks when the symlink would be broken on the remote side or when the symlink would point to files outside the module. This happens to royally screw me in a big way. I had scripts in place for years doing a very high-impact job, broadcasting code and templates from a development server out to a bunch of production servers, and the new behviour broke all the production servers. I "request and require" (as Emporer Gregor VorBarra says) that my files get replicated -exactly-, so the above combination of new-with-3.0 config options, use chroot, numeric ids, and munge symlinks, results in the old behaviour.

    Wups, not 100% true. I do want user id's to be translated where possible. If a file is owned by user filepro on the client box, I want it owned by user filepro on the server box if possible. If filepro is uid 200 on the client box but is uid 201 on the server, I want the files to wind up on the server with uid 201. numeric ids = false does this.

    The new behavior is a security feature of course. Generally, if you are going to define a module and allow a user to create files only in that path, then probably it's not a good idea to allow the user to simply create symlink files that point to files outside that path. Possibly this is is all only true when uid = root and/or when use chroot = false, since, if a non-root user creates a symlink to, say, /etc/passwd, they still can't overwrite the real file.


    Also, aside, Just in case anyone runs into this, I just noticed that the most recent binary from my site actually fails to run on osr507mp1

    I have no idea why getaddrinfo isn't found, it's in libsocket in oss646c and I thought osr507, even without a single patch, superceded oss646c. I'm investigating it now,... ah, it works fine on 506 or lower with oss646c, but you can't install oss646c on 507, but you CAN install oss646b, so to run this binary on 507 requires mp higher than mp1 (don't know the lowest mp that still works, but mp5 works.) or, if unwilling to do that, possibly oss646b would work.

    --
    Brian K. White brian@aljex.com http://www.myspace.com/KEYofR
    +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
    filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!

  7. Re: rsync server on SCO 5.0.,7

    On Sep 12, 8:51*am, "Brian K. White" wrote:
    > I'm responding to the list because, well just because I guess you could say those are the only terms I'm offering for this kind of help at this time.. As admittedly stuffy/snooty as that sounds. I'm willing to give away timeand effort to everyone, or one person can pay for my time just for theirself.
    >
    > Except, since my company has way too much work for me for ourselves and our customers to ever assign me to a generic unix consult task like that, and since I don't moonlight, paying me is not actually an option after all.
    >
    > So, that just leaves the list, and sorry if you end up only getting what you pay for! heh.
    >
    > I don't want to remove most of this quoted stuff, but it's a lot, and my client failed to quote this reply, so look for a couple sections enclosed in "---bkw---" below almost at the bottom.
    >
    >
    >
    > ----- Original Message -----
    > From: "AB"
    > To: "Brian K. White"
    > Sent: Thursday, September 11, 2008 8:17 PM
    > Subject: Re: rsync server on SCO 5.0.,7
    >
    > On Sep 11, 11:05 am, "Brian K. White" wrote:
    > > ----- Original Message -----
    > > From: "AB"

    >
    > > Newsgroups: comp.unix.sco.misc
    > > To:
    > > Sent: Wednesday, September 10, 2008 10:30 PM
    > > Subject: rsync server on SCO 5.0.,7

    >
    > > >I want to rsync files to one SCO 5.0.7 server(host) from 3 others
    > > > (remote). .I have installed the latest rsync from aljex.com. on all
    > > > servers. I want to run the rsync daemon on the host server. I created
    > > > the /etc/rsynd.conf file, I modified /etc/inetd.conf to run the rsync
    > > > daemon. I ran "/etc/init.d/rsyncd enable" and "/etc/init.d/rsyncd
    > > > start". I just don't think the daemon is running. I do not see it in
    > > > the list of running processes. When I try to run rsync commands from a
    > > > remote server, it connects, asks me for a password (it appears to be
    > > > using ssh) and then fails with the following:

    >
    > > > sh: rsync: not found
    > > > rsync: connection unexpectedly closed (0 bytes received so far)
    > > > [receiver]
    > > > rsync error: error in rsync protocol data stream (code 12) at
    > > > io.c(600) [receiver=3.0.0]

    >
    > > > Have I missed a step somewhere?

    >
    > > > My rsyncd.log on the host server looks like this:

    >
    > > > 2008/09/10 21:06:37 [11201] rsyncd version 3.0.0 starting, listening
    > > > on port 873
    > > > 2008/09/10 21:06:37 [11201] bind() failed: Address already in use
    > > > (address-family 2)
    > > > 2008/09/10 21:06:37 [11201] unable to bind any inbound sockets on port
    > > > 873
    > > > 2008/09/10 21:06:37 [11201] rsync error: error in socket IO (code 10)
    > > > at socket.c(535) [receiver=3.0.0]
    > > > 2008/09/10 21:07:17 [11205] rsyncd version 3.0.0 starting, listening
    > > > on port 873
    > > > 2008/09/10 21:07:17 [11205] bind() failed: Address already in use
    > > > (address-family 2)
    > > > 2008/09/10 21:07:17 [11205] unable to bind any inbound sockets on port
    > > > 873
    > > > 2008/09/10 21:07:17 [11205] rsync error: error in socket IO (code 10)
    > > > at socket.c(535) [receiver=3.0.0]
    > > > 2008/09/10 21:41:58 [11305] rsyncd version 3.0.0 starting, listening
    > > > on port 873
    > > > 2008/09/10 21:41:58 [11305] bind() failed: Address already in use
    > > > (address-family 2)
    > > > 2008/09/10 21:41:58 [11305] unable to bind any inbound sockets on port
    > > > 873
    > > > 2008/09/10 21:41:58 [11305] rsync error: error in socket IO (code 10)
    > > > at socket.c(535) [receiver=3.0.0]
    > > > 2008/09/10 21:43:13 [11318] rsyncd version 3.0.0 starting, listening
    > > > on port 873
    > > > 2008/09/10 21:43:13 [11318] bind() failed: Address already in use
    > > > (address-family 2)
    > > > 2008/09/10 21:43:13 [11318] unable to bind any inbound sockets on port
    > > > 873
    > > > 2008/09/10 21:43:13 [11318] rsync error: error in socket IO (code 10)
    > > > at socket.c(535) [receiver=3.0.0]
    > > > 2008/09/10 21:58:11 [710] rsyncd version 3.0.0 starting, listening on
    > > > port 873
    > > > 2008/09/10 21:58:11 [710] bind() failed: Address already in use
    > > > (address-family 2)
    > > > 2008/09/10 21:58:11 [710] unable to bind any inbound sockets on port
    > > > 873
    > > > 2008/09/10 21:58:11 [710] rsync error: error in socket IO (code 10) at
    > > > socket.c(535) [receiver=3.0.0]

    >
    > > > My rsyncd.conf looks like this:

    >
    > > > motd file = /etc/rsyncd.motd
    > > > log file = /usr/adm/rsyncd.log
    > > > pid file = /usr/adm/rsyncd.pid
    > > > lock file = /usr/adm/rsync.lock

    >
    > > > [rsync_files_directory]
    > > > path = /am/rsync
    > > > comment = rsync server
    > > > uid = nobody
    > > > gid = nobody
    > > > read only = no
    > > > list = yes
    > > > auth users = root
    > > > # hosts allow = ap2 dev ap1
    > > > secrets file = /etc/rsyncd.scrt

    >
    > > > /etc/inetd.conf line looks like this:

    >
    > > > rsync stream tcp nowait root /usr/local/bin/rsync rsyncd --
    > > > daemon

    >
    > > You're sort of mixing up 3 things there.

    >
    > > Which do you want?
    > > 1 rsync over rsh?
    > > 2 rsync over ssh?
    > > 3 native rsync?
    > > 4 native rsync via inetd?

    >
    > > 1) rsync over rsh
    > > * requires rsync binary on the server and command line options to specify rsh "-e rcmd"
    > > * does not require any rsync config or secrets files
    > > * must not have line in inetd.conf
    > > * client rsync command line uses single colon
    > > * client rsync command line uses either an absolute path, or a path relative to the users home dir on the server (not a module)
    > > * user and pass are a unix user on the server, just like telnet/ftp/etc....

    >
    > > 2) rsync over ssh
    > > * all same as for rsh, with following exceptions/additions:
    > > * requires ssh server on the server and ssh client on the client (old versions don't have it and may not be easy to add)
    > > * no -e option necessry since "-e ssh" is the default on the recent builds. originally I used to make "-e rcmd" the compiled-in default for osr5 builds because back then ssh was not built-in and sometimes not easy to add,but rcmd has been built-in forever, and enabled by default, and so it "works out of the box" even without any actual rhosts user equivalency set up (just rquires manually entering the password each time)

    >
    > > 3) native rsync
    > > * requires rsync binary on the servser (running in daemon mode)
    > > * requires rsynd.conf and rsyncd.secrets
    > > * must not have line in inetd.conf
    > > * client command line uses double colon
    > > * client command line uses module + path relative to, or within, module, as defined in rsyncd.conf on server
    > > * user and pass are only from rsyncd.secrets on server and utterly unrelated to any unix user (/etc/passwd) on server

    >
    > > 4) native rsync via inetd.conf
    > > * should be about the same as native rsync, except adding the need to configure /etc/inetd.conf and /etc/services
    > > * I never even tried this once. The man-page allows for the possibilityof launching via inetd, but I don't know what would be the right inetd config for rsync, so I don't know if the line you have is a good one.

    >
    > > I personally use native rsync extensively. Between many osr5 boxes fromosr504 to 507, and numerous 32 and 64 bit linux versions and freebsd and sparc solaris.

    >
    > > The supplied start script works, as long as the rsync binary itself works and as long as you haven't supplied bad config files. The compiled-in defaults work with other sco boxes that have the same the same package installed for at least the last few versions until 3 or more versions ago when I stopped overriding the default of "ssh" for remote-shell.

    >
    > > In any event, all compiled-in defaults can be overridden with command line options anyways. They are just a convenience to make manually entered commands as simple as possible.

    >
    > > There are numerous reasons why the service may fail to start up the first time you ever try.
    > > The two most common are:
    > > 1) you didnt supply the necessary dependancies as stated on the web page where you got the package. (oss646c)
    > > on 5.0.7 you shouldn't need to supply anything.
    > > 2) something wrong with config file.

    >
    > > So, on the server, fist just get the binary working at all (the daemon is the same binary, once it runs at all, then the daemon works also, although you still need to have a sane config file).

    >
    > > On the server, what do these do?

    >
    > > rsync --version
    > > ldd /usr/local/bin/rsync

    >
    > > Also, your error logs indicate that the binary is probably able to run ok, since it runs far enough to discover that inetd is already occupying the tcp port it wants.

    >
    > > So:

    >
    > > * comment out the line in inetd.conf
    > > * restart inetd
    > > * ps -ef |grep sync and kill any pid's for any rsync processes
    > > * netstat -an |grep 873 and verify that nothing is listening on 873
    > > * move the secrets file, uid, gid lines to the global section of rsyncd..conf (maybe the way you have it is legal, I just never did that and we want to start with a working config, then try to get fancy from there.)
    > > * chown nobody:nobody /am/rsync, or chmod 777 /am/rsync, or chgrp nobody /am/rsync AND chmod 775 /am/rsync, etc... In other words, arrange, however you like, that your specified uid and gid can write to /am/rsync.
    > > * not required but suggest changing the module name to something short,since you have to type it in on ever rsync command line from the clients, change [rsync_files_directory] to [am]
    > > * verify that /etc/rsyncd.scrt has at least one line "root:something"
    > > * start rsync: /etc/init.d/rsync start
    > > * netstat -an |grep 873 and verify rsync is now listening
    > > * go to remote (but still on the lan) box and:

    >
    > > touch /tmp/foo
    > > rsync -av /tmp/foo server::am

    >
    > > (answer "something" to the password prompt)
    > > If you were not logged in as root then use:
    > > rsync -av /tmp/foo root@server::am

    >
    > > That syntax used the native/direct rsync, and the config changes I specified should have set up a working standalone rsync daemon without inetd.

    >
    > > You can still use rsync via rsh(rcmd) and ssh at the same time, as longas the rsh and ssh servers are runing on the server and you have rsh & sshclients on the client. rcmd is the only one of those garanteed to be thereeven on older osr5, and by default it's still enabled in inetd.conf, so from the clients you could also run:

    >
    > > rsync -av /tmp/foo server:/am/rsync
    > > rsync -av -e rcmd /tmp/foo server:/am/rsync

    >
    > > Those will only work for root, because the target

    >
    > ...
    >
    > read more - Hide quoted text -
    >
    > - Show quoted text -



    Brian,

    First sorry - I didn't mean to reply just to you. I definitely want
    this on the list so others can benefit. Just wanted to let you know I
    have it working in native mode. I was doing almost everything
    correctly, but was completely brain-dead with regards to the path
    issues. Once I set the proper paths - it worked! Thank you for
    that! Now I will get into the finer points of it, and try to make it
    work with ssh via cronjobs.

+ Reply to Thread