NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
SirNas
Aug 02, 2020Aspirant
Readynas rsync failing on .ssh folder
Hi, I am backing up a Readynas 204 to a Readynas 428 using rsync over SSH. I was previously pushing data from the 204 --> 428, but my institution blocked port 22, so now I have to use the 428 to pul...
SirNas
Aug 04, 2020Aspirant
I'm confused about two things.
1. How is it working at all? That local user shouldn't have access to all the other users files. I didn't give that user access.
2. Why is it failing on that folder now that I am pulling instead of pushing? Is pushing from the NAS to do backups of the home folders somehow different?
schumaku
Aug 05, 2020Guru - Experienced User
Show the config of the backup job (screenshots).
If the intention is to backup all home folders the user must (of course....) have at least read access to all users home folders on the remote (source) system.
The rsync process on that remote system does run under that user the UID and GID and probably secondary groups. When I look on the masks andthe ACLs on files and folders in the users folder, I get this:
root@RN516:~# getfacl /data/home/myusername/*
# file: data/home/myusername/VDO_1269.avi
# owner: myusername
# group: users
user::rwx
user:myusername:rwx
group::r-x
group:users:r-x
mask::rwx
other::r-x
....so not even ACLs in place...
root@RN516:~# ls -als /data/home/myusername/VDO_1269.avi
167964 -rwxrwxr-x+ 1 myusername users 171994108 Aug 05 2020 /data/home/myusername/VDO_1269.avi
So you see - a process run by a normal user created by the ReayNAS Web UI defaults to the user group users - and it has access to all, well, almost all files.
When looking into a typical .ssh - I show the /root/.ssh as an example (similar for other users in thier home folder) - you find that the .ssh and it's content has special protection masks in place, e.g. to "protect" the private key:
root@RN516:~# ls -als /root/
total 28
0 drwx------ 1 root root 88 Mar 3 22:22 .
4 drwxr-xr-x 1 root root 296 Mar 3 22:28 ..
12 -rw------- 1 root root 9305 Jul 17 20:57 .bash_history
4 -rw-r--r-- 1 root root 570 Jan 31 2010 .bashrc
0 drwxr-xr-x 1 root root 38 Sep 26 2015 .forever
4 -rw-r--r-- 1 root root 140 Nov 19 2007 .profile
4 -rw------- 1 root root 1024 May 9 2019 .rnd
0 drwx------ 1 root root 32 Jun 15 2013 .ssh
root@RN516:~# ls -als /root/.ssh
total 8
0 drwx------ 1 root root 32 Jun 15 2013 .
0 drwx------ 1 root root 88 Mar 3 22:22 ..
4 -rw------- 1 root root 1679 Jun 15 2013 id_rsa
4 -rw-r--r-- 1 root root 399 Jun 15 2013 id_rsa.pub
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!