the second time rsyncing a readonly file
Dan Jacobson
jidanni at jidanni.org
Sun Apr 24 16:37:11 GMT 2005
Like nifteaux (nifto) man, all I did was change the sleep time and I
get different results:
$ touch u; sleep 0;touch v; chmod 0 v; rsync u v; ls -og u v; /bin/rm -f u v
-rw-r--r-- 1 0 2005-04-25 00:05 u
---------- 1 0 2005-04-25 00:05 v
$ touch u; sleep 1;touch v; chmod 0 v; rsync u v; ls -og u v; /bin/rm -f u v
-rw-r--r-- 1 0 2005-04-25 00:05 u
-rw-r--r-- 1 0 2005-04-25 00:05 v
OK, never mind that. What bothers me is
rsync: open "/mnt/usb/cf/webtree/media/ham/freq/freedom_en.html"
failed: Permission denied (13)
rsync error: some files could not be transferred (code 23) at main.c(702)
-r-xr-xr-x 1 jidanni 4248 2005-04-18 03:31 freedom_en.html
Therefore in the manual at
-p, --perms
This option causes rsync to set the destination permissions to
be the same as the source permissions.
also mention what to do when one copies some readonly files, only to
find that later we can't update them a second time, because they are
readonly. Duh.
One sees a --force, but the docs say it is for other purposes.
I used rsync -a --inplace -v webtree /mnt/usb/cf
-p: Without this option, each new file gets its permissions set
based on the source file's permissions and the umask at the
receiving end,
Added?, subtracted?, etc. Say so.
More information about the rsync
mailing list