I am trying to use "rsync" to copy file to another machine. This is the command I am trying:
sudo rsync -avztP --delete --recursive --inplace /folder1/folder2/folder3/myfile [email protected]:/backup/files -e "ssh -o StrictHostKeyChecking=no"
I am getting this error:
sending incremental file list
file1
25728640 100% 15.38MB/s 0:00:02 (total: 100%) (xfer#1, to-check=0/1)
rsync: open "/folder1/folder2/folder3/myfile" failed: Permission denied (13)
sent 25736406 bytes received 31 bytes 2258914.96 bytes/sec
total size is 25728640 speedup is 1.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1355) [sender=3.0.9]
Here are the permissions of the local machine:
ls -ld / /folder1 /folder1/folder2/ /folder1/folder2/folder3/ /folder1/folder2/folder3/myfile
drwxr-xr-x 26 root root 4096 Jul 25 23:00 /
drwxr-xr-x 25 root root 4096 Sep 16 23:37 /folder1
drwxrwxrwx+ 12 root root 4096 Feb 29 2020 /folder1/folder2/
drwxrwxrwx+ 2 admin users 4096 May 4 2019 /folder1/folder2/folder3/
-rwxr-xr-x 1 admin users 25728640 May 4 2019 /folder1/folder2/folder3/myfile
And the permissions on the remote machine:
ls -ld / /backup /backup/files/
drwxr-xr-x 20 root root 26 Sep 5 21:25 /
drwxr-xr-x 3 root users 3 Sep 13 02:07 /backup
drwxrwsr-x 2 root root 2 Sep 13 02:07 /backup/files/
Linux on local machine: Linux DiskStation 3.10.105
Linux on remote machine: Ubuntu 20.04.1 LTS, Linux 5.4.0-47-generic x86_64.
Am I missing anything?