So this is my first bash script attempt, and I am trying to rsync a project folder on OS X to a development server running ubuntu 14.04. I get some permission errors on the destination server when I try to rsync as my user 'developer' but I also got them when I did it as user 'ubuntu'. I cannot try as root due to default cloud server settings on EC2.
Here is my shell script.
#!/bin/bash rsync -r —l -t -z -v -e "ssh [email protected]" --exclude “/Applications/MAMP/htdocs/finalall/nbproject/” --delete /Applications/MAMP/htdocs/finalall/ :/var/www/html afplay "/System/Library/Sounds/Morse.aiff" This is my error:
building file list ... rsync: link_stat "/Users/xxxxx/?\#200\#224l" failed: No such file or directory (2) done IO error encountered -- skipping file deletion rsync: failed to set times on "/var/www/html/.": Operation not permitted (1) ./ rsync: recv_generator: mkdir "/var/www/html/nbproject" failed: Permission denied (13) *** Skipping any contents from this failed directory *** testerterst.php nbproject/ rsync: mkstemp "/var/www/html/.testerterst.php.TISozV" failed: Permission denied (13) sent 493 bytes received 54 bytes 1094.00 bytes/sec total size is 971 speedup is 1.78 rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9] here is (some of) the output of sudo cat /etc/group
ssh:x:108: landscape:x:109: admin:x:110: ubuntu:x:1000: ssl-cert:x:111: developer:x:1001: Sincere thanks for any help. It is greatly, greatly appreciated.
The output to ls -lZd / /var/ /var/www/ /var/www/html/ is:
drwxr-xr-x 22 root root ? 4096 Aug 5 19:53 / drwxr-xr-x 13 root root ? 4096 Aug 5 20:00 /var/ drwxr-xr-x 3 root root ? 4096 Aug 5 20:00 /var/www/ drwxr-xr-x 2 root root ? 4096 Aug 5 20:17 /var/www/html/ 
ls -lZd / /var/ /var/www/ /var/www/html/say?