LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-06-2008, 12:37 AM   #1
mokrunka
LQ Newbie
 
Registered: Sep 2008
Posts: 7

Rep: Reputation: 0
mount.nfs: access denied by server while mounting


Hi all,

I'm having trouble using nfs to mount a remote filesystem (all of it, from /) on my local machine. Here is what I tried:

Code:
controls@UTAEngineer:/bin$ sudo mount Engineer:/ /Engineer.home/
mount.nfs: access denied by server while mounting Engineer:/
Here is the output of my /etc/exports file

Code:
controls@UTAEngineer:/bin$ cat /etc/exports 
# /etc/exports: the access control list for filesystems which may be exported
#		to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync) hostname2(ro,sync)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt)
# /srv/nfs4/homes  gss/krb5i(rw,sync)
#
/home Engineer(rw,no_subtree_check,no_root_squash)
/home UTAEngineer(rw,no_subtree_check,no_root_squash)
/ Engineer(rw,no_subtree_check,no_root_squash)
/ UTAEngineer(rw,no_subtree_check,no_root_squash)
Any suggestions? Please let me know if you need more info.
 
Old 10-06-2008, 12:56 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
This is the exports list on the remote (server) system?

Did you run exportfs -a ?
 
Old 10-06-2008, 11:58 PM   #3
mokrunka
LQ Newbie
 
Registered: Sep 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Mr. C. View Post
This is the exports list on the remote (server) system?

Did you run exportfs -a ?
Code:
controls@UTAEngineer:~$ exportfs -a
exportfs: could not open /var/lib/nfs/etab for locking
exportfs: can't lock /var/lib/nfs/etab for writing
controls@UTAEngineer:~$ sudo exportfs -a
[sudo] password for controls: 
controls@UTAEngineer:~$
Actually that exports file was on the local system.
This exports file is the remote system (server):

Code:
mokrunka@Engineer:~$ cat /etc/exports 
# /etc/exports: the access control list for filesystems which may be exported
#		to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync) hostname2(ro,sync)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt)
# /srv/nfs4/homes  gss/krb5i(rw,sync)
#
/home UTAEngineer(rw,no_subtree_check,no_root_squash)
/home Engineer(rw,no_subtree_check,no_root_squash)
/ Engineer(rw,no_subtree_check,no_root_squash)
/ UTAEngineer(rw,no_subtree_check,no_root_squash)

mokrunka@Engineer:~$
I simply made the two files the same I thought this would certainly allow either machine to mount nfs drives... Perhaps I am wrong?
 
Old 10-07-2008, 12:05 AM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
You need to be root to export file systems (i.e. use exportfs -a)

The server's /etc/exports controls the which file systems can be exported and hence served to clients. The client's /etc/exports has no affect.

/etc/exports: server configuration file tells server which file systems to export.
/etc/fstab: client configuration file tells local system which file systems to mount, and how to mount them.
 
Old 10-07-2008, 12:53 AM   #5
mokrunka
LQ Newbie
 
Registered: Sep 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Yes, I figured out the issue. I had to restart the nfs daemon because when I changed the /etc/exports file to IP addresses instead of hostnames, the daemon needs a restart before it will actually use the newly edited exports file. Ha, who knew... Thanks for your help!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 11:34 AM
Mounting an nfs share - Permission Denied doctorwebbox Linux - Networking 5 05-30-2005 01:45 AM
NFS mounting : Permission denied Bahador Linux - Networking 3 07-18-2003 04:33 AM
NFS Problem mounting 2 systems:Permission Denied by server meng_en Linux - General 3 09-23-2002 11:24 PM
permission denied when mounting nfs directory keirobyn Linux - Networking 3 01-29-2002 12:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration