0

I have a directory on a Linux server that gets rsync'd to a location on a network share drive (NFS?), which is accessible by Windows desktop users;

rsync -vrthP /server/dir /network/dir

A user made an edit to a file on /network/dir from their Windows desktop. I expected & designed for edited files on /network/dir to be overwritten by newer versions of the same files in /server/dir. This is exactly how the rsync command shown acts on Linux.

However, after the user edited a file in /network/dir from Windows, I am unable to overwrite the file with newer versions from /server/dir. Example:

$ rsync -vrthP /server/dir/file.txt /network/dir/file.txt
sending incremental file list
file.txt
         69.95M 100%  406.55MB/s    0:00:00 (xfr#1, to-chk=0/1)
rsync: rename "/network/dir/.file.txt.zFibXJ" -> "file.txt": File exists (17)

sent 69.96M bytes  received 207 bytes  139.93M bytes/sec
total size is 69.95M  speedup is 1.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]

The file in question:

$ ls -l /server/dir/file.txt
-rw------- 1 user servergroup 69945761 Jan  8 10:25 /server/dir/file.txt


$ ls -l /network/dir/file.txt
-rwxr-xr-x 1 user user 69671599 Dec 21 11:18 /network/dir/file.txt

The really weird part is that if I make edits to either the source file, or the destination & source file, from my Linux server (RHEL 7), then rsync acts properly and overwrites the destination file with the newer source file. However, if the destination file is ever edited from Windows, it seems that rsync returns this error when trying to overwrite the destination file with a newer source file.

Any ideas what is going on, and how I can solve this?

  • update: the issue seems to be common for these kinds of network drives, and occurs and disappears randomly – user5359531 Jan 19 at 3:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.