[PLUG] Rsync user confusion: Who is user 1026?

Tomas Kuchta tomas.kuchta.lists at gmail.com
Tue Jul 12 02:17:18 UTC 2016


Here is simple example of NFS NAS and client (PC) configuration:

Names and abreviations:
  * data - NFS server dir to be exported
  * nfsServerIp - IP of NFS Server
  * nfsClientIp - IP of NFS client (example: 192.168.1.100)
  * networkIp - IP of your network (example: 192.168.1.1)
  * nfsClientMountDir - mount directory for NFS share (not to be used for anything else. 
Example: /nfs/filer)
  * CP - Control Panel

NFS v4 background:
  * NFS server must recognize your client users by user names (UIDs may be different). 
The easiest way to achieve that is to create all not-root users owning stored files on the 
NFS server.
  * If you are mounting multiple NFS server directories into multiple mount points on 
client - you must keep the servers directory tree structure in the clients mount directory. 
Bullet proof simple rule is to create data dir on the NFS server and mount that on client, 
keeping all data directories will be inside that data dir.

Synology NAS:
  * Create users (not root) owning the data to be stored: CP -> User -> Create
    make users members of users group 
  * Create Shared Folder data: CP -> Shared Folder -> Create -> data
    NFS Permissions (tab) -> Create -> Hostname or IP: nfsClientIp
                                       Priviledge: Read/Write
                                       Squash: No mapping
                                       Enable asynchronnous: Yes
      If you have other NFS clients which do not need root access you can chose for them:
                                       Squash: Map root to guest
      If you have a lot of nfs client on the same network you can use:
                                       Hostname or IP: networkIp/24
  * Enable NFS: CP -> File Services -> Enable NFS: Yes
                                       Enable NFSv4 Support: Yes

Client Setup mounting NFS folder data to nfsClientMountDir
  * install nfs-client nfsidmap packages
  * create nfsClientMountDir: mkdir nfsClientMountDir (become root if needed)
  * create /etc/fstab entry:
    nfsServerIp:/volume1/data nfsClientMountDir nfs4 defaults,suid 0 0
    If you do not want to auto mount NFS share at boot time, and allow users to 
mount/umount on demand - change the line to:
    nfsServerIp:/volume1/data nfsClientMountDir nfs4 defaults,suid,noauto,users 0 0

I hope that I did not forget anything, Tomas

On Monday, July 11, 2016 05:37:46 PM John Jason Jordan wrote:
> On Mon, 11 Jul 2016 18:04:41 -0500
> 
> David Fleck <david.fleck at mchsi.com> dijo:
> >Forgive me if somebody has already posted this link:
> >https://www.synology.com/en-us/knowledgebase/DSM/tutorial/File_Sharing/How_
> >to_access_files_on_Synology_NAS_within_the_local_network_NFS
> >
> >Perhaps there is something in there that will clear up what the
> >configuration issue is.
> 
> Thank you, I had not yet found that.
> 
> I read through the whole thing and followed the instructions to the
> letter, but I still get 'access denied by server.'
> 
> I should add that their instructions say the mount command should be
> (copied and pasted):
> 
> 	mount [Synology NAS IP address] : [mount path of shared
> 	folder] / [mount point on NFS client]
> 
> Thus my command should be
> 
> 	mount 192.168.0.101:Synology / /media/jjj/Synology
> 
> Note the extra / between the source and the destination. If I add it
> the mount command fails completely and displays help information. The
> extra / can't be right.
> 
> And when I try it without the extra / it generates 'only root can do
> that.' If I preface it with sudo or do sudo su to root, then I get
> 'access denied by server.'
> 
> At the very end of the instructions it says "Can't mount the shared
> folder? The user account you enter here must have access privileges for
> the shared folder that you wish to map." I'm not sure where 'here' is,
> the NAS or my command line? In any event, when I initially set up the
> NAS with the Synology DiskStation Manager it came with an admin and a
> guest account and I added an account 'jjj.' I gave all of them every
> permission I could find.
> 
> I recently discovered a user forum on Synology's website. My next
> effort wll be to post my tale of woe there.
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug



More information about the PLUG mailing list