Weird issue with Rsync

Hi guys

I’m trying to use Rsync to keep specific folders on my wdtv livehub up to date, and it’s been fairly happy (I thought) until I noticed that it had stopped working - 

rsync: mkstemp “/media/WDTV/downloads/.new media transfer.mkv.fo75A8” failed: Operation not permitted (1)

I can’t find the temp file that’s been created while looking at the mounted samba share - but the wdtv keeps reporting ‘getting content info’ every time I try to trigger a file transfer

I’ve switched the mode of the transfers to be 

rsync -OPau --inplace /media/USBHDD1/t/completed/ ./downloads/

Which seems to be a bit more reliable, but can’t set times on files (which I’d like to be able to do)

How do I check and see if the temp files have been left - or if they’ve been purged automatically?

are you running rsync directly on the WD or from a remote PC

if directly on WD, that would be out of the scope of this forum

however, ls -al /path/…

to see all files including hidden

also the error seems self explanitory “Operation not permitted”

sounds like permission issue

which I’ve noticed will usually be associated with the hidden .wd_tv folder which contains the media library database files

I’d recommend a chmod -R 777 /path/…

prior to running rsync and that will probably solve your issues

Hi Kad79

Yeah - running the command on my Pi where I’ve mounted the WDTV as a samba share

I normally list all files using ls -la, and I’m dropping everything into a sub folder so it shouldn’t need to modify .wd_tv - I’ve changed the rsync command to:

rsync -OPurlpgoD --inplace /media/USBHDD1/completed/ ./downloads/

So removing time sync solves the immediate permissions issue - I just like to be difficult and bump the last modified time on the folder, so it sits first when sorting

I might disable twonky as I have an inkling that that might be one of the issues

twonky might be worth looking at

but the reason I bring it up the permissions is that I’ve noticed in my case

cp files between various compters and server and WD accessing the server the files created by WD don’t inherit the permissions set

in my case this would only be the .wd_tv folder because I keep everything on a separate server

but if your using rsync to place files on the internal drive of the WD then other files could be affected by a similar permission issue as well

Yeah - I tried CP, but I’m more comfortable mounting the share and using rsync

this way I’ve got fairly good reporting through my scripts -  and I can have a single script syncing to multiple devices around the house - I’m sure my wife thinks I’m batty, but there’s method to my madness :wink:

It looks like the issue occurs when the WDTV tries to fetch the metadata - equally it could simply be that it won’t allow you to tweak dates on folders and files

I’m happy that it’s working as it is now, and it seems nice and fast