I’m trying to mount my NAS device via NFS with suse 11.1, but up to now it failed.
The NAS does support NFS, but it requires a UID and a user name and up to now I could not figure out the correct nfs mount options for that.
If I just make mount 192.168.0.2:/nas1 /mnt a get the error message “mount.nfs: access denied by server while mounting 192.168.0.2:/nas1”. So can somebody please tell me the correct options for user name and user id which the mount should use. And, preferable the correct entry for the etc/fstab file to make this mount being executed automatically during startup.
I studied the mount(8) and nfs manpages several times, but I do still have no idea how to make it.
It’s not a secret, it’s a simple Claxan NAS200 running with original firmware based on some Linux OS. But I do not have console access, this would be available only with some other firmware.
There is not so much documentation about the NAS, but it requires the Remote UID, the IP-address and netmask and the mapping user name. So normally we should not need a console access, but need to know how to send the UID and user name to the NAS via mount command or /etc/fstab entry.
Actually you are root when doing the mount, but I do not want to mount the NAS with UID 0, maybe it does not work either.
In my office we do have a NFS client for Windows in order to mount our Solaris server with appropriate user and group IDs, so this should work with with Linux too, but how?
If it does require a user name, you will have to create a user in Linux and then create that user in the Samba client.
As an added note, you may find that you have to add a little bash script to the Autostart folder so that it will mount the drive every time you log in. I had to do this and used the following script.
#!/bin/bash
/bin/sleep 10
/bin/mount -a
I named it mount.sh and made it executable. Then I went into YAST SUDO and connected it to my user account and set an alias to root with no password, so that it would run automatically with no user input from me. You have to be root to mount a drive, so this part makes it work well.
The NAS does not allow an anonymous login, but I can access it with Netbios / Samba, same as for Windows PCs. However, I found that the Samba login via Linux is not very convenient as I need to provide the login credentials every time an application does access the NAS folder. E.g. I start doplhin file manager and open the NAS folder, then I have to provide a valid user name and password, then I browse with doplhin for some MP3s and click on one one of them, the MP3 player is started and asks again for my user name and password. Same for other applications or if you close and restart dolphin again. This is not very convenient and, by the way, the Amarok player does not work at all when the files come from the NAS, I need to copy them to the local hard disk first, which is also not very convenient.
Anyway, in my opinion it should be better to use NFS as the NAS does support this and any UNIX system does it too. Usually you do not need to provide UID and GID for the mount among UNIX systems, but maybe the NAS requires it due to the fact that the whole thing is designed to work for Windows, Apple and UNIX systems.
Why do I not see some mount options which allow me to provide a specific user ID or user name for the NAS? It seems that there are such options, but not for NFS devices. >:(
Follow the link I posted above. Swerdna has a wealth of information there.
So, on this NAS, if you connect to it with Windows, you have to give it a username and password? My D-Link NAS will do this too, but only once it has been changed from the default.
You can’t “send” a UID like in CIFS/SMB. The way NFS works the mount is done, and then the UIDs have to match at each end to be the “owner”. Although there is a UID map facility. You’ll have to figure out how to create the directory with the right owner at the NAS end to have permissions on it. But you still have to do the mount as root, although you can use the “users” option in mount to delegate this capability to the users.
I created same user accounts on the NAS as well as on Windows and Linux PCs (and my old OS/2 PC), including passwords. With Samba it does work, but on Linux I’d still prefer NFS if possible.
OK, then the big question is what the NAS does expect if it does ask for a “Remote UID” for the NFS shares?
With the information from Swerdna it should be possible to mount the NAS shares with CIFS, meaning Samba. I’ll try it, but I still do not understand what the NAS developpers have done on their side. Maybe I need to ask them to understand how they did intend to use the NFS connections on the Claxan NAS.
NFS emulates a filesystem with ownership info on objects and this info comes from the native filesystem on the server.
I suppose you have tried the obvious? That is, to make the top directory world writable, then as the intended account, create a subdirectory. This should then get owned by the intended account. Below that you can then create all the objects you need.
Incidentally it looks like Claxan is (or at least was) using FOSS in their devices since they were charged with GPL violation a few years ago but cleaned up their act. So if they are still using FOSS in your model it ought to be possible to see what they have done.
Hmm, I do not know how this should work.
With the Claxan original firmware you can setup one root directory which is used as share name too, that’s all, in fact that’s probably not a directory but the share name only. Then you can specify user and group settings for that share. There is no way to create sub-directories with different user or group settings, at least I would not know how to make it. Of course I could try to make that share writeable for everyone, but I think even that is not supposed to be done.
Then, on the NFS settings page, you must setup the remote UID, an IP address with netmask and a mapping user name. That’s it. As the error message from the NAS is “access denied”, I must assume that IP-address and netmask are OK.
For me still the big question is, how the guys from Claxan or ARP Datacon intended to use that share by NFS clients, either it is too easy for me or I just did not yet get the key point.
By the way, the NAS200 seems not to be affected by the GPL license violation.
Ok so what if you make the remote UID the same as the intended user’s UID on the client side, can you mount it (as root) and use it from that user? If you get access denied when mounting, then the UID hasn’t come into play yet. What about the netmask, is this specified as a quad or as a prefix length? Did you get that right? (There is another brand of NAS where the help message about the netmask is ambiguous.)
What about documentation is there any? Any Claxan forums on the Net?
The IP-address and netmask are given as 192.168.0.3/24. Actually I would expect to write 192.168.0.0/24 but the NAS does not allow that.
The documentation is quite poor, and from the Claxan forum I did not get help up to now. It seems that most of those guys installed an alternative firmware on the NAS, but this is not what I intend to do.
You’re mixing up some things: the IP-address I mentioned is not that one on the Linux PC but the definition on the NAS side. I have to specify which computers are allowed to mount the share of the NAS. And therefore it would be better if I could specify a whole network IP address rather than a specific one. Assume the Linux PC is on DHCP, how should I tell my NAS, make single entries for all IP-addresses of the DHCP range?
Anyway, I’ll double check that.