rsync problems and security concerns

Posted by MB. on Ask Ubuntu See other posts from Ask Ubuntu or by MB.
Published on 2012-07-08T19:56:31Z Indexed on 2012/07/08 21:23 UTC
Read the original article Hit count: 412

Filed under:
|
|

Hi I am attempting to use rsync to copy files between two linux servers. both on 10.04.4

I have set up the ssh and a script running under a cron job. this is the message i get back from the cron job.

To: mark@ubuntu Subject: Cron ~/rsync.sh Content-Type: text/plain; charset=ANSI_X3.4-1968 X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: Message-Id: <20120708183802.E0D54FC2C0@ubuntu> Date: Sun, 8 Jul 2012 14:38:01 -0400 (EDT)

rsync: link_stat "/home/mark/#342#200#223rsh=ssh" failed: No such file or directory (2) rsync: opendir "/Library/WebServer/Documents/.cache" failed: Permission denied (13) rsync: recv_generator: mkdir "/Library/Library" failed: Permission denied (13) * Skipping any contents from this failed directory * rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1060) [sender=3.0.7]

Q.1 can anyone tell me why I get this message -->

rsync: link_stat "/home/mark/#342#200#223rsh=ssh" failed: No such file or directory (2)

the script is:

    #!/bin/bash
SOURCEPATH='/Library'
DESTPATH='/Library'
DESTHOST='192.168.1.15'
DESTUSER='mark'
LOGFILE='rsync.log'
echo $'\n\n' >> $LOGFILE
rsync -av –rsh=ssh $SOURCEPATH $DESTUSER@$DESTHOST:$DESTPATH 2>&1 >> $LOGFILE
echo “Completed at: `/bin/date`” >> $LOGFILE

Q2. I know I have several problems with the permissions all of the files I am copying usually require me to use sudo to manipulate them. My question is then is there a way i can run this job without giving my user root access or using root in the login ??

Thanks for the help .

© Ask Ubuntu or respective owner

Related posts about permissions

Related posts about root