2
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]
ps: changing the rsync command from your first post without mounting the share would be a solution, but if you are working on a Mac, then, at almost any time it would be better to mount the share and then copy files "locally" because that uses the apple provided software, the software that fit into your Apple pc, and that piece of software that apple improve instead of the standard Gnu rsync (it would mostly not be the standard Gnu rsync but apple does not improve those applets, but there own tools to mount and so on) – Schwertspize – 2015-08-10T17:32:12.390