cron, rsync and permissions

This is a discussion on cron, rsync and permissions within the Rsync forums, part of the Networking and Network Related category; Hello, I am at my first attempts with scripting, cron, and rsync, so please bear with me... The scope is ...


Go Back   Usenet Forums > Networking and Network Related > Rsync

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008
GianLuca Sarto
 
Posts: n/a
Default cron, rsync and permissions

Hello,

I am at my first attempts with scripting, cron, and rsync, so please
bear with me...

The scope is to backup two servers from a dedicated backup pc, with the
following script:

mv *.log archive
rsync --log-file=oracle.log -av -e "ssh -i .ssh/rsync-key"
gian@oracle:/home/gian/exp* oracle/
rsync --log-file=vib_home.log -av --delete --exclude=".*/" -e "ssh -i
..ssh/rsync-key" gian@vib:/home/ vib_home/
rsync --log-file=vib_office.log -av --delete -e "ssh -i .ssh/rsync-key"
gian@vib:/office/ vib_office/

This script works fine from the command line, but the last two lines
hang with permissions errors when executed as cron job.
The cron job is in my user table.

First backup from server oracle works fine, because the two files copied
are in my home directory, so no permission issues.

The second backup hangs with this error:

2008/04/17 02:00:28 [6161] receiving file list
2008/04/17 02:00:28 [6161] rsync: opendir "/home/gabri/Maildir" failed:
Permission denied (13)
2008/04/17 02:00:28 [6161] rsync: opendir "/home/enzo/Maildir" failed:
Permission denied (13)
2008/04/17 02:00:28 [6161] rsync: opendir "/home/enzo/Mail" failed:
Permission denied (13)
2008/04/17 02:00:28 [6161] rsync: opendir "/home/francesco/Maildir"
failed: Permission denied (13)
2008/04/17 02:00:28 [6161] rsync: opendir "/home/deborah/Maildir"
failed: Permission denied (13)
2008/04/17 02:00:28 [6161] rsync: opendir "/home/deborah/mail" failed:
Permission denied (13)
2008/04/17 02:00:28 [6161] rsync: opendir "/home/lost+found" failed:
Permission denied (13)
2008/04/17 02:00:28 [6161] rsync: opendir "/home/william/Maildir"
failed: Permission denied (13)
2008/04/17 02:00:28 [6161] rsync: opendir "/home/faxmaster/Maildir"
failed: Permission denied (13)
2008/04/17 02:00:28 [6161] rsync error: errors with program diagnostics
(code 13) at log.c(230) [receiver=2.6.9]

I do not have read permissions for the folders above, but I can read all
the rest.
Why rsync aborts?

The third backup reports this:

2008/04/17 02:00:33 [6163] receiving file list
2008/04/17 02:00:33 [6163] rsync: opendir "/office/lost+found" failed:
Permission denied (13)
2008/04/17 02:00:33 [6163] rsync error: errors with program diagnostics
(code 13) at log.c(230) [receiver=2.6.9]

The same here.
I have read permissions for all folders excepting for lost+found.
Why rsync gives up on the first error?

As I said, launching ./backup.sh from command line the script warns
about permission errors, but goes on.

Thanks for your time,
cheers,
-Gian





--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:02 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0