Rsync help for backing up to a old nas

Hey all

I got a strange problem ( well its strange to me as am still new ish to linux)

i am trying to rsync files from my ubuntu server 22.04 to an old nas. i have managed to get the mount setup so I can view the nas i can copy files to the nas i can create folders on the nas via command line in ubuntu but when i use rsync i get this error

mason64@luss4:/mnt/share/backupoffice$ rsync -av /home/mason64/bandwidthtest.txt /mnt/share/backupoffice/test
sending incremental file list
rsync: [receiver] mkstemp “/mnt/share/backupoffice/test/.bandwidthtest.txt.6xY4wo” failed: Operation not permitted (1)

sent 1,364 bytes received 35 bytes 2,798.00 bytes/sec
total size is 1,242 speedup is 0.89
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]

Could it be because its an old nas using SMB 1 ? this is just going to be used to backup files from a server daily using rsync for local backup only and will never have online access. (understand SMB 1 is not very secure.).

Would anyone have any ideas on why i cant use rsync but i can do it manually with cp “filename” “/mnt/share/backupoffice/test” and that works.

Thank you

confirm the user permissions for the user running rsync on the remote directory. Does that user have access to write to the directory, and, create new sub-directories?

If it is acceptable to you, can you try running rsync with sudo?

Hi @Mr_McBride Thanks for the reply.

I have tried with sudo and i get the same error i can manually in the command line create directories and sub directories no problem.


ls -l /mnt/share/backupoffice

This should give us an indication of what may be happening. Also run

ls -l /home/mason64/bandwidthtest.txt

Was this file created as root and does your user have permission to read the file?

In addition, from what I can tell, because you are using smb, the file attributes don’t get copied over. Why not try rsync via ssh instead of the smb mount?

I had a similar issue with an SMB share that I had mounted. I couldn’t get the file ownership to sync to the SMB share. So I used the command rsync -rtDvWP --inplace --size-only --no-perms --delete, to copy the files. It’s not as simple -a option and I’m sure there’s a better way, but this worked for me.