× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Re: NAS RN10200 and Linux Mint 17.1

DaveC49
Aspirant

NAS RN10200 and Linux Mint 17.1

Hi,
I have recently added a RN10200 NAS (IP 192.168.0.2) to my network. it is physically connected to my WiFi Router(NetgearDG384PN). I have multiple Apple (IOS7/7.1, Windows(8.0) (192.168.0.3) and a Linux Mint 17.1(Cinnamon) box (IP 192.168.0.4) connected to the network. I want to mount the Linux box using NFS and use the Home directory share. I have setup two users on the NAS with usernames (david, cernak) and uids(1000,1001) the same as my Linux users (same usernames on the Windows box as well but I am not connecting it yet) with membership of group users(gid=100). Both my users on the Linux box are members of its group users with gid=100.
The NAS is exporting shares as follows:

showmount -e 192.168.0.2
Export list for 192.168.0.2:
/home *
/data/Videos (everyone)
/data/readydrop 192.168.0.3,192.168.0.4,127.0.0.1
/data/Pictures 192.168.0.3,192.168.0.4,127.0.0.1
/data/Music 192.168.0.3,192.168.0.4,127.0.0.1
/data/Documents 192.168.0.3,192.168.0.4,127.0.0.1
/data/Backup (everyone)


I have exported the user home directories in /etc/ exports as follows:

/home/david/ 192.168.0.2(rw,sync,no_subtree_check,no_root_squash)
/home/cernak/ 192.168.0.2(rw,sync,no_subtree_check,no_root_squash)

I have the following entries in /etc/fstab

192.168.0.2:/home /mnt/server/home/david/ _netdev,rw,auto,hard,rsize=65536,wsize=65536,intr 0 0
192.168.0.2:/home/ /mnt/server/home/cernak/ _netdev,rw,hard,auto,rsize=65536,wsize=65536,intr 0 0

I created directories in /mnt as follows
/mnt/server/home/david user=david, group=users, permissions =775
/mnt/server/home/cernak user=cernak,group=users, permissions=775

and I have mounted the directories as follows:

sudo mount -o _netdev,rw,hard,auto,rsize=65536,wsize=65536,intr -t nfs 192.168.0.2:/home /mnt/server/home/david
sudo mount -o _netdev,rw,hard,auto,rsize=65536,wsize=65536,intr -t nfs 192.168.0.2:/home /mnt/server/home/david

192.168.0.2:/home /mnt/server/home/david/ _netdev,rw,auto,hard,rsize=65536,wsize=65536,intr 0 0
192.168.0.2:/home/ /mnt/server/home/cernak/ _netdev,rw,hard,auto,rsize=65536,wsize=65536,intr 0 0

mount shows the shares as being mounted.

If I look at the /mnt/server/home/david directory in the file Manager it shows up as asymlink and the ownership is changed to 98 - user #98 and the group to 98 and permissions 755. If I try to drop a file there I cannot as permission is denied. I cannot find any adequate description in any documentation as to how the home share is meant to be used. My expectation would be if I exported my user home directories from my Linux box and established users with the same uid and a gid as a group my users were in that the Home share should be able to link to this (WRONG!!) or alternatively that my NAS should automatically export the home shares of the NAS users and these should be accessible by mounting the home share. WRONG!! If I try and mount 192.168.0.2:/home/david or 192.168.0.2:/home/cernak, this doesn't work either. I have searched the readyNAS forum and can't find any explanation for this as well as LinuxMint , Ubuntu forums. In most cases however the advice relates to previous versions of the NAS software and earlier versions of the operating systems

I am obviously missing something, but I am not sure exactly what. I have found various references to uid and gid mapping in nfs documentation but not in the man pages for nfs, mount and /etc/export and /etc/fstab on my system. As the NAS appears to be running a Debian system, I would have thought connecting via nfs to another Linux system should have been trivial. Can anyone offer any advice??
Message 1 of 8
StephenB
Guru

Re: NAS RN10200 and Linux Mint 17.1

If I am understanding you properly, you are wanting to substitute the mint folders for the NAS home share for david and cernak.

What happens if you adjust the mount points so that the NFS mounts are subfolders within each user's home share?
Message 2 of 8
DaveC49
Aspirant

Re: NAS RN10200 and Linux Mint 17.1

I would like to do at least two different things. I primarily bought the NAS (RN10200) as a backup device and I would like to back up data from the home directories on the Linux box as well as some other directories i.e. /var/www where I previously had critical setup info for website developments. (recently lost several weeks work after an upgrade bombed out in progress and then reinstallation of the OS overwrote data. My bad as I am still getting familiar with Linux and hadn't yet worked out how to better protect myself). A lot of it was virtual host files for my Apache server, not so much the direct code. I can handle most of that by locating the files in my home directory and using symlinks to access it from the root filesystem. I have at least two users on that box , and on a windows box as well as multiple Apple devices (iPhones, iPad). Primarily, I want to backup the home directories to the NAS. The whole lot is on a home LAN. Some of the data in my home directory requires securing but I can attend to that once I have the system basically working. I would also like to use the share so that all my directories can appear on both the Linux box (nfs share) and a Windows box (cifs share) of the same directories and afp shares to the apples devices although i can use the readyCloud for most requirements there.

I also would like to share some files ( pics, videos and documents) from the NAS to all devices ( secondary objective and not critical).

I have had the mount points as subfolders within the Linux box home directories prior to trying to mount the under /mnt following the mount procedures described on p62 of the readyNAS OS6 software manual. The result was the same. The ownership and group of the folders and permissions is changed to 98 and User#98 and 755 respectively (prior to mount had been david, users and 775). I am unable to access the directories, change the ownership or group and the permissions after I have mounted the share.

I am surprised that after having created the users on the NAS, the Home share from the NAS does not have subfolders created for each user and that these aren't shared separately ( it does have a subfolder for the readyCloud account I created during the initial setup). I am unable to create subfolders within the Home share on the NAS itself and I am unable to create them from the Linux box . The lack of information from Netgear on how the default shares, particularly the Home shares where you are not able to configure access and permissions, they supply on the NAS are meant to be used I find truly amazing. My concept originally was that I would mount the home share on a subdirectory of my Linux box home directory, transfer my files to it and then remount it as the home directory. last night I totok the NAS system back to factory defaults and the reset it up

The basic problem is do to with ownership and group membership of the share from the NAS after it is mounted on the Linux box. I have no idea who user 98 is. It is not a user on my Linux box so I presume it has been created by the NAS during the NFS information exchange during the mount on the Linux box. It is not however a user uid on the NAS so I presume it is some system user on the NAS as user uid's start at 100 on the NAS.

From my research on nfs it should be able to negotiate a mapping of the linux box uids and gids to the NAS uids and gids (nfs4) using the map_daemon options or a static map using the map_static options, but these do not appear to be available. it is not clear whether the NAS box mounts its shares using nfs v2,3 or 4 but I presume v3. The nfs server on my Linux box can mount a share from a server using a specific version of nfs but appears to negotiate that itself unless you specify the version.

I exported the home directories from the Linux box, while trying to work out how to do backups but there appears to be no way on the NAS to connect a folder as client to a specific share from the Linux box as a server. I created a folder Backups on the NAS shared over SMB, NFS (anyhost, default file access everyone, owner and group rw, granting rename and delete privileges to non owners, ownership and group as guest) and AFP. I have installed a phpSysInfo App on the NAS so I can try to get a clearer picture of what is happening on it, but it does not display permissions on the mounts in the NAS but I can see all the shared mounts on the NAS (btrfs). Mounting this backup folder in my Linux home directory resulted in exactly the same problems . The mounted share on the Linux box is owned by user 98 as before and the permissions prevent it being used for anything useful. I have noticed a few posts on other forums with Netgear NAS users having the same problems, but no-one has reported a solution. ( I have noticed several posts where frustrated users are vowing to confine their NAS to oblivion and I am beginning to have some sympathy with this point of view.)
Message 3 of 8
StephenB
Guru

Re: NAS RN10200 and Linux Mint 17.1

UID 98 is admin, UID 99 is guest. This is easily seen via "cat /etc/passwd"

Home folders are created for each user in /data/home. Each user folder is owned by that user, and the permissions are drwx------.

Do you have ssh enabled on the NAS? what firmware are you running?
Message 4 of 8
DaveC49
Aspirant

Re: NAS RN10200 and Linux Mint 17.1

Hi StephenB,

Have successfully managed to setup backups of the home directories on the Linux box to the NAS Backups share I created. Solves that problem but does not solve the problem of accessing NAS shares from the Linux box.

cat /etc/passwd has no users with UID 98 or 99 on the Linux box. So they must be on the NAS. Having NAS users as the owners of the shares is clearly the problem

When I am logged in as admin on the NAS, I cannot see the user directories in /data/home. with drwx------, I should be able to see them as admin.

I don't currently have ssh enabled on the NAS but I can set it up if necessary and I am running firmware 6.2.2

Cheers
Davec49
Message 5 of 8
StephenB
Guru

Re: NAS RN10200 and Linux Mint 17.1

DaveC49 wrote:
Hi StephenB,

Have successfully managed to setup backups of the home directories on the Linux box to the NAS Backups share I created. Solves that problem but does not solve the problem of accessing NAS shares from the Linux box.

cat /etc/passwd has no users with UID 98 or 99 on the Linux box. So they must be on the NAS. Having NAS users as the owners of the shares is clearly the problem

When I am logged in as admin on the NAS, I cannot see the user directories in /data/home. with drwx------, I should be able to see them as admin.

I don't currently have ssh enabled on the NAS but I can set it up if necessary and I am running firmware 6.2.2

Cheers
Davec49
Try enabling ssh on the NAS.

When I access the NAS with SMB with admin credentials, I can see admin, data/home/admin, and home/admin. These are all the same folder btw.

If you use other user credentials, you'll just see the user folder (home and data folders are only shown with admin credentials).
Message 6 of 8
DaveC49
Aspirant

Re: NAS RN10200 and Linux Mint 17.1

Made some more progress.
I enabled ssh on the NAS. I then logged in from the Linux box with my user account matching the Linux box account.
When I logged in a home directory was immediately created which was now visible from the Browse from the home share folder on the NAS and when mounted on the Linux box is now accessible.

I take it this is a bug with the admin web interface that it does not create the user directory when the user account is created and that a login is necessary to force the system to create the directory.

I can now drag and drop files etc into the shared home directory, currently mounted as /mnt/server/home and the folder david exists in the mount and is accessible. It also mounts the home directory for the ReadyCloud account directory, but it is not accessible at present. I should be able to transfer all my files to the exported then use a symlink from my home directory to the mounted home directory /mnt/server/home/david.
Message 7 of 8
DaveC49
Aspirant

Re: NAS RN10200 and Linux Mint 17.1

thanks Stephen B

I now have my home mounts up and running and have set up the shares for music videos,docs and a few others and backups underway.

Cheers
DaveC49
😄 😄
Message 8 of 8
Top Contributors
Discussion stats
  • 7 replies
  • 3119 views
  • 0 kudos
  • 2 in conversation
Announcements