Trouble with rsync syncing from OS X Sierra to Windows Server 2012 share
First post - sorry if I'm putting this in the wrong community.
This seems like an easy question, but I must be missing something obvious...
I'm trying to write a backup script for a few Macs in our environment. The script is supposed to:
1. Connect to the user's private folder (located in our network on a Windows Server 2012 share)
2. Sync stuff from the user's desktop and documents folder into 2 folders on the share - 'backups-desktop' and 'backups-documents'
Here are the pertinent parts of the script:
umount /volumes/username [some of the users already have their share mounted, so this makes sure I don't mount it a second time, which causes problems]
open smb://network-share-location
sleep 5
rsync -aE --delete /Users/username/Desktop/ /Volumes/username/backups-desktop
rsync -aE --delete /Users/username/Documents/ /Volumes/username/backups-documents
When I run the script I get a bunch of "permission denied (13)" error messages. None of the files are able to sync, only empty folders.
It doesn't seem to be a permissions error - the user has R/W permission for the share folders on the Mac side, and everything except for 'Full Control' on the Windows side.
Also, when I log into the Mac as the user I don't have any issues manually connecting to the network share and copying files from the Mac into the share... it's just when I try to run rsync that it has issues.
Thanks for any help.
iMac, macOS Sierra (10.12.6)