I have 2 Western Digital NAS: a blue light and a 2TB MyBook latest edition. I enabled ssh on the MyBook and I can use rsync from a terminal to sync files between the 2 NAS. Instead of copying using a laptop for copying between the NAS's (my laptops are connected to WiFi, the 2 NAS are in the Ethernet in the same router).
Later when trying to access the files from a Windows OS machine (Vista) the files are Hidden. I mapped the NAS share drive with a user that has full control. So from Windows I was able to change the attribute to visible.
But how can I transfer files without doing this extra step on Windows?
Here the process in detail
So first I transferred using ftp from my laptop to MyBook connecting as root.
The files ended with permissions
-rw-r--r-- 1 root root ...
Without doing any changes to permissions I copied them using rsync connected as root via ssh in the MyBook to the other NAS. I couldn't hack my other NAS yet, so I have to mount the other NAS file system using cifs:
mount -t cifs -o user=username,password=** //IP-target-NAS/share /mnt/local-share/
The username I used to mount is a user defined in the target NAS via the UI. This is the same username I use to connect from my laptops to the Windows shares on that NAS.
If I do an ls -l the permissions are:
-rwx------ 1 www-data www-data ...
If I check the permissions from other files, that I copied from NAS to NAS using the Windows laptop (a lot of time!), they are:
-rw-r--r-- 1 www-data www-data