NFS Mount
Hello,
I am new to linux, and am trying to figure out how to connect to NFS mount. This is running on a windows server, I keep getting "unrecognized mount point" makes me think I may be using the wrong command. |
try this on client machine
Code:
#mount -t nfs server ip/location/to/dir /mount/point |
You could also check server nfs export list:
Code:
/usr/sbin/showmount -e <server ip or name> |
NFS Mount
Here is what I get:
[root@cs sbin]# showmount -e 10.67.36.34 Export list for 10.67.36.34: /RF7800N_NFS (everyone) [root@cs sbin]# mount -t nfs 10.67.36.34/location/to/dir /rfcafs24/RF7800N_NFS? mount.nfs: mount point /rfcafs24/RF7800N_NFS? does not exist [root@cs sbin]# |
Code:
mkdir /mnt/tmp |
try creating /rfcafs24/RF7800N_NFS? before mounting
|
[root@cs sbin]# mount -t nfs 10.67.36.34:/RF7800N_NFS /mnt/tmp
mount.nfs: access denied by server while mounting (null) [root@cs sbin]# cd /mnt/tmp bash: cd: /mnt/tmp: Permission denied [root@cs mnt]# cd tmp bash: cd: tmp: Permission denied Is this the server denying? |
I am able to ping the 10. fine. My guess is I am on the domain if i can ping the 10. I am just trying to rule out any issues from the RHEL client end, if this is the server blocking mount.
|
This is strange...
Did you try to cd into the directory when loggued as simple user, just in case ? |
here it is as normal user:
[jweath02@cs /]$ ls bin dev home lost+found misc net proc sbin srv tmp var boot etc lib media mnt opt root selinux sys usr [jweath02@cs /]$ cd mnt [jweath02@cs mnt]$ ls tmp [jweath02@cs mnt]$ cd tmp bash: cd: tmp: Permission denied [jweath02@cs mnt]$ still getting the same regardless if Root or normal user. |
What is the output with ls -al /mnt/tmp ?
Does the windows system administrators say something about how to set up unix account to work with nfs shares ? |
Quote:
first thing I don't get the concept of mounting NFS on /mnt but even if you want to continue using it, I would like to see the permissions on this directory Code:
#ls -l / | grep mnt Code:
#mkdir /NFS Quote:
On the NFS server run this command and show me the output Code:
#exportfs -v |
[jweath02@cs ~]$ ls -l / | grep mnt
drwxr-xr-x. 3 root root 4096 Jan 3 21:29 mnt [jweath02@cs ~]$ ls -l /mnt total 1 drwx------. 2 4294967294 4294967294 64 Jan 4 08:43 tmp [jweath02@cs ~]$ |
[root@cs /]# mount -t nfs 10.67.36.34:/RF7800N_NFS /NFS
[root@cs /]# ls bin dev home lost+found misc net opt root selinux sys usr boot etc lib media mnt NFS proc sbin srv tmp var [root@cs /]# mount -t nfs 10.67.36.34:/RF7800N_NFS /NFS mount.nfs: access denied by server while mounting (null) First attempt no error, second attempt gets denied. |
have you configured any firewall on server?
show me the output of Code:
#exportfs -v <---------on NFS server Code:
#iptables -L Code:
#service portmap status |
Quote:
I don't understand the owner of this tmp directory but you can try changing th ownership and permission and give a try to mounting Code:
#chown root:root /mnt/tmp |
The NFS server us running on a Windows machine...
|
[root@cs /]# iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT icmp -- anywhere anywhere ACCEPT all -- anywhere anywhere ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh REJECT all -- anywhere anywhere reject-with icmp-host-prohibited Chain FORWARD (policy ACCEPT) target prot opt source destination REJECT all -- anywhere anywhere reject-with icmp-host-prohibited Chain OUTPUT (policy ACCEPT) target prot opt source destination IP tables on the client is posted above. No firewall config, this is a fresh install of RHEL 6.2 WS |
[root@cs /]# chown root:root /mnt/tmp
chown: changing ownership of `/mnt/tmp': Permission denied [root@cs /]# chmod 777 /mnt/tmp chmod: changing permissions of `/mnt/tmp': Permission denied [root@cs /]# |
Never worked with NFS server on windows :(
check the firewall on windows and on your linux machine |
stop the firewall and try mounting
Code:
#service iptables stop |
[root@cs /]# service iptables stop
iptables: Flushing firewall rules: [ OK ] iptables: Setting chains to policy ACCEPT: filter [ OK ] iptables: Unloading modules: [ OK ] [root@cs /]# mount -t nfs 10.67.36.34:/RF7800N_NFS? /NFS mount.nfs: access denied by server while mounting (null) [root@cs /]# mount -t nfs 10.67.36.34:/RF7800N_NFS /NFS mount.nfs: access denied by server while mounting (null) [root@cs /]# mount -t nfs 10.67.36.34:/RF7800N_NFS /NFS mount.nfs: access denied by server while mounting (null) |
Quote:
you said the server is on windows? I don't think I would be able to help with windows stuff but here are some links might be helpful http://social.technet.microsoft.com/...-f4bf40de9c8d/ http://support.microsoft.com/kb/324089 |
I was sent /RF7800N_NFS?, I was trying it without ? just in case. My goal is to rule out the linux box and point the issue back to the Windows server.
|
So any reason why I am unable to get to /mnt/tmp ?
**Permission denied** This is on client end, correct. |
Hey, make new account with uid = 4294967294 in linux box :p
|
???
|
Couple of things -
From looks of it NFS is linux mount point correct? make sure before mounting to do a chmod 777 on that directory. Ultimately filesharing permissions will be handled else where so having it open doesn't matter. Second - if you are able to mount device than odds are there is a UID/GID issue on windows side. Even though it says device is open to everyone the mount itself is controlled by UID/GID on windows side. So if you keep getting permission denied check permissions on both folder AND verify UID 0 has permission to access device FROM WINDOWS side. |
This is what was given to me.
rfcafs24/RF7800N_NFS? Server name and mount. Perhaps I mixed something up? |
Also I am getting permission denied when trying to run chmod 777 on mnt/tmp and /NFS
|
Are you mounting this as a specific user or root? It seems like you are trying to do this as a non-root user. Unless specified by root non-root users will not be able to mount specified device.
|
Here this might help: Our Full procedure from both Windows and Linux Side
From Windows: Network File Share “NFS” File sharing This applies to setting up Windows 2003, Windows 2008 server to setup Unix accessible file or folder shares. 1. Install the NFS role, or on W2k3, install Windows Network file sharing service. 2. Edit the NFS Configuration: a. In Windows 2003 this is done via the Network file sharing GUI located under administrative tools b. In Windows 2008 this can be done under the “Share and storage Management” GUI or under “Edit Network File sharing configuration” wizard 3. Editing the NFS configuration a. Selecting Identity Mapping Solution: Only required if you intend to setup a Active Directory Authentication, or User Name Mapping Authentication. Note: I was unable to use the AD authentication on our network due to the requirement of a 2008 functional level Domain. Note: I was unable to use a User Name Mapping Server, without a Win2K3 Server, the only version that supports the User Name Mapping Server service. b. Setup Domain Authorization: This is not required at this point because our domain would not support AD authentication c. Open firewall ports: Was not required on our network.. May be required to traverse networks. d. Use NFS to Share Folders: This is the main part of the setup. i. Click “Provision a Shared Folder Wizard” in the right pane. ii. Browse to the Drive / folder you wish to share iii. Select Next, select “yes” to change NTFS permissions iv. Add the “Everyone” user account and provide the needed NFS permissions Note: Everyone is not provided access to the NFS share you are creating, it only will allow the specific UID, GID account specified under the “Allow anonymous access” we will setup Select “Next” and check the NFS share name. Select “Next” and check “Allow anonymous access” Click “Edit” to the right of the permissions box, and set Full control. Click “Add” and enter either the FQDN or the IP address of the Unix Host that needs to access this share. Ensure you give read write and root access rights. Click Next and Next again to skip the Filter and Quota sections. Go back to the Share and Storage Management console and refresh the display. The new NFS share should appear at the bottom. (in Win2k3 you will see the share listed under the NFS GUI. Right click the share and select properties. Click the permissions TAB and select NFS permissions. Select the client unix computer / server that you entered and enter the Anonymous UID GID provided by the Unix department for that server. This is usually a 4 digit number and select Ok. That’s it.. have them test the mount to this share from the Unix server side. Linux: As root create new directory to mount nfs share: Code:
# mkdir /mymount Code:
# chmod 777 /mymount Code:
# showmount -e 111.111.111.111 Code:
/sharedMount (everyone) Code:
# mount -t nfs 111.111.111.111:/sharedMount /mymount Note: If you are unable to cd to filesystem but it does mount then check window's directory permissions for specified user. --Just as a heads up our window's team handles windows share - I asked for their procedure. Hopefully this helps ya out some. |
Googlin' for uid 4294967294 brings some interesting results...
One suggests to mount nfs share as nfs v.3 Try it: Code:
mount -t nfs -o vers=3 10.67.36.34:/RF7800N_NFS /NFS |
[root@cs /]# mount -t nfs -o vers=3 10.67.36.34:/RF7800N_NFS /NFS
mount.nfs: access denied by server while mounting (null) [root@cs /]# |
RF7800N_NFS
[root@cs /]# mkdir /mymount [root@cs /]# chmod 777 /mymount [root@cs /]# showmount -e 10.67.36.34 Export list for 10.67.36.34: /RF7800N_NFS (everyone) [root@cs /]# mount -t nfs 10.67.36.34:/RF7800N_NFS /mymount [root@cs /]# ls bin dev home lost+found misc mymount NFS proc sbin srv tmp var boot etc lib media mnt net opt root selinux sys usr [root@cs /]# cd mymount bash: cd: mymount: Permission denied [root@cs /]# |
I am guessing at this point it must be permissions on the windows box...
agree? |
/RF7800N_NFS (everyone)
[root@cs /]# mount -t nfs 10.67.36.34:/RF7800N_NFS /mymount mount.nfs: mount system call failed after changes to server... any ideas? changed for anonymous access on server end |
Was uid changed ? ls -l /mymount
|
check to see if nfsnobody user exists on Linux box - and check uid of that user - when file system is mounted.
Who is owner of file system when it is mounted and if there is a uid what is uid? |
just as a general note - windows does not make nfs easy - their documentation has errors all over it so I seriously feel for anyone who ever has to utilize this method.
|
[root@cs /]# ls -l /mymount
ls: cannot open directory /mymount: Permission denied [root@cs /]# |
And with: ls -ld /mymount
|
Just do an ls on / and see who owns directory
if it is something other than UID 0 or root try to su to that user and access directory. Althought this is still most likely a permissions issue on windows side - Just googled and came up with this link for permissions on Windows side - maybe this will help some - http://support.microsoft.com/kb/324544 |
[root@cs /]# ls -ld /mymount
drwxrwxrwx. 2 4294967294 4294967294 64 Jan 4 08:43 /mymount |
[4294967294@cs /]$ mount -t nfs 10.67.36.34:/RF7800N_NFS /NFS
mount: only root can do that ---------- Post added 01-06-12 at 10:24 AM ---------- [root@cs /]# ls bin boot dev etc home lib lost+found media misc mnt mymount net NFS opt proc root sbin selinux srv sys tmp usr var [root@cs /]# |
Why is your prompt like:
Code:
4294967294@cs |
That is bugged nfsnobody uid -
you won't be able to mount as nfsnobody but once root mounts it you should be able to access device as nfsnobody. whoever has window's side set up doesn't have uid/gid set up correctly - Are you using any maps? Also translation files sometimes can cause access issues as well. |
[root@cs /]# service nfs status
rpc.svcgssd is stopped rpc.mountd is stopped nfsd is stopped rpc.rquotad is stopped |
at one point in this forum someone asked me to create a user 4294967294 and try to mount
|
No, I suggested to create an user with any name you want, but with uid=4294967294 and gid=4294967294
(uid is user identification number, gid is group identification number) It is just for testing... You could name it nfsnobody Do you already have a nfsnobody user set in your /etc/passwd file ? Check with : grep nfsnobody /etc/passwd ...if it returns something |
All times are GMT -5. The time now is 02:13 PM. |