rsync over SSH fails to preserve permissions in FreeNAS-11.1-U6

Status
Not open for further replies.

swampther

Cadet
Joined
Sep 29, 2018
Messages
7
Following the guide at http://doc.freenas.org/11/tasks.html#rsync-over-ssh-mode I successfully established an rsync task between 2 FreeNAS servers using the root accounts. However, even when ticking the box to preserve permissions, the task changes the owner of the folder from user1 to root.

I've been trying to set up keys for user1 so I can rsync over SSH with the user instead of root and hopefully preserve permissions. The documentation is insufficient for establishing user keys. By default new users have no home directory, but I was able to add one. Now I'm stuck on the command
"ssh-keyscan -t rsa 192.168.2.6 >> /root/.ssh/known_hosts".
Is this intended to be run as the user by first using 'su - user1' and if so wouldn't the path need to be changed to the users .ssh folder inside the user folder? I tried it both ways and get an 'no such file or directory' error when trying to perform the command as user1.

I'm new to FreeNAS and have limited Unix/Posix/BSD experience.

Thank you.
 

swampther

Cadet
Joined
Sep 29, 2018
Messages
7
UPDATE: Permissions are preserved unless rsync is copying a folder to the root of a share (Samba). I changed the path one level deeper and the permissions were preserved correctly.

However, I still would like to learn how to set up SSH keys correctly for users. Please advise if you have the answer.
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
UPDATE: Permissions are preserved unless rsync is copying a folder to the root of a share (Samba). I changed the path one level deeper and the permissions were preserved correctly.

However, I still would like to learn how to set up SSH keys correctly for users. Please advise if you have the answer.

User @Glorious1 has written a good 'How To' on this subject:

https://forums.freenas.org/index.php?threads/how-to-how-to-access-your-freenas-server-remotely-and-securely.27376/#post-175641

And if you search the forum for "set up ssh keys" you'll find add'l information that may be useful as well.

Good luck!
 
Status
Not open for further replies.
Top