I'm trying to create a bash script which will be executed when I plug my mobile device into my PC (Linux).
My goal is to compare all my Obsidian directory (a directory with several folders and markdown files with text info) in the mobile device and PC based on the modification date. So, if a markdown file is newer than the one on the cellular, it should be replaced by the newest.
To do this, I am using the rsync -ra command, but the problem is that I am accessing my cellular via mpt, so when rsync tries to set the time to the files when transferring, I am getting this error:
rsync: [generator] failed to set times on "/run/user/1000/gvfs/mtp:host=243c3c45/cellular/Obsidian/Folder": Operation not supported (95)
rsync: [receiver] mkstemp "/run/user/1000/gvfs/mtp:host=243c3c45/cellular/Obsidian/Folder/JOURNAL/.mi\#303\#251rcoles 08 may 2019.md.bLVDHD" failed: Operation not supported (95)
Apparently, it's a permissions issue. My mobile has Android OS (unrooted). I tried it with sudo with no luck.
I would like to synchronize the notes offline via USB cable.
The issue is not rsync-/Linux-originating.
Since this is an Android/Windows specific issue, you might have better luck obtaining a solution looking where those answers are provided.
The issue lies with MTP capabilities, as summarized here.