I want to run rsync to copy files from local mac folders to a corporate network drive. To access the network drive I have to mount it using different credentials compared to my local user account.
How can I tell my bash script (that runs a few different rsyncs) to run as the other user (my corporate network user) to avoid getting forbidden (13) errors
failed: Permission denied (13)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-45/rsync/main.c(992)
EDIT:
Ok, so I created and mounted a share at ~/smb/pfimp/ - I can read the files perfectly fine, and it will create folders on the file server, but it can't copy the actual files over.
Any other suggestions? thanks
MAC:bin mylocaluser$ rsync -azP --exclude=.DS_Store ~/Documents/Work/Master/Scripts/demo/ ~/smb/pfimp/Scripts/demo
building file list ...
38 files to consider
./
external/
external/workflow.py
1225 100% 0.00kB/s 0:00:00 (xfer#1, to-check=35/38)
external/override/
external/override/before.py
3229 100% 3.08MB/s 0:00:00 (xfer#2, to-check=33/38)
rsync: mkstemp "/Users/mylocaluser/smb/pfimp/Scripts/demo/external/.workflow.py.sEm5kg" failed: Permission denied (13)
rsync: mkstemp "/Users/mylocaluser/smb/pfimp/Scripts/demo/external/override/.before.py.iKs9MS" failed: Permission denied (13)
sent 2811 bytes received 82 bytes 385.73 bytes/sec
total size is 31779 speedup is 10.98
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-45/rsync/main.c(992) [sender=2.6.9]