Problem backing up read-only files

Gary Johnson garyjohn at spocom.com
Thu Jul 22 20:57:14 MDT 2010


On 2010-07-23, Alex Ferrara wrote:
> Hi Gary,
> 
> It looks like the problem occurs after rsync has transferred the
> file and is renaming the temporary file to the actual name. I am
> guessing that the HP media vault has Samba running on it, and it
> is actually denying access.
> 
> As a long show, you could try --inplace, which will mean rsync
> does not need to rename the file.

That worked for the initial transfer of that read-only file, but ne  Cfor the attempt to update it with a newer version.

    bash-3.2$ touch *
    bash-3.2$ ll
    total 2
    -r--r--r-- 1 Gary Johnson None 13 Jul 22 19:46 rstest1.txt
    -rw-r--r-- 1 Gary Johnson None 13 Jul 22 19:46 rstest2.txt
    bash-3.2$ rsync -vv --inplace * //hpmediavault/Documents/rstest
    delta-transmission disabled for local transfer or --whole-file
    rstest1.txt
    rstest2.txt
    rsync: open "/hpmediavault/Documents/rstest/rstest1.txt" failed: Permission denied (13)
    total: matches=0  hash_hits=0  false_alarms=0 data=26

    sent 159 bytes  received 50 bytes  418.00 bytes/sec
    total size is 26  speedup is 0.12
    rsync error: some files/attrs were not transferred (see previous errors) (code 23) at /home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/main.c(1040) [sender=3.0.4]
    bash-3.2$ ll //hpmediavault/Documents/rstest
    total 2048
    -r-------- 1 Gary Johnson None 13 Jul 22 19:42 rstest1.txt
    -rw------- 1 Gary Johnson None 13 Jul 22 19:46 rstest2.txt

I guess that's to be expected since the man page says, in the
description of the --inplace option,

    (4) a file that does not have write permissions can not be
    updated,

That will let me do the initial backup of several more files that
happen to be read-only, but unfortunately doesn't solve the problem
in the long term.

Thanks for your help.

Regards,
Gary



More information about the rsync mailing list