LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
 
LinkBack Search this Thread
Old 02-27-2008, 03:24 PM   #1
sidra
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora Core 3, Red Hat 9, CentOS 4.2, Mandriva, Ret Hat Enterprise Linux 4.0
Posts: 116

Rep: Reputation: 15
NFS mount permission denied


I'm trying to export a directory on a server and mount it from another server. The error given is as below:

mount: IP:/dir failed, reason given by server: Permission denied

My /etc/exports file looks like this:

/dir IP/Netmask(rw,sync,no_root_squash)

I tried the insecure option in the /etc/exports file but it doesn't work. I also tried giving the IP of the specific machine in the /etc/exports file where i'm trying to carry out the mount but it's the same error.

Can anyone help?
 
Old 02-27-2008, 03:26 PM   #2
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
Quote:
Originally Posted by sidra View Post
I'm trying to export a directory on a server and mount it from another server. The error given is as below:

mount: IP:/dir failed, reason given by server: Permission denied

My /etc/exports file looks like this:

/dir IP/Netmask(rw,sync,no_root_squash)

I tried the insecure option in the /etc/exports file but it doesn't work. I also tried giving the IP of the specific machine in the /etc/exports file where i'm trying to carry out the mount but it's the same error.

Can anyone help?
How are you trying to mount? Are you doing it as root or a normal user? Is the mount listed in your fstab or are you doing it by hand?
 
Old 02-27-2008, 05:40 PM   #3
sidra
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora Core 3, Red Hat 9, CentOS 4.2, Mandriva, Ret Hat Enterprise Linux 4.0
Posts: 116

Original Poster
Rep: Reputation: 15
Doing it by hand as root

mount IP:/dir /mnt/temp

Also tried:
mount -t nfs IP:/dir /mnt/temp

Doesnt' work!
 
Old 02-28-2008, 02:50 AM   #4
harsshal
Member
 
Registered: Jul 2006
Location: New York, NY
Distribution: redhat,ubuntu,RHEL,fedora,centOS
Posts: 105

Rep: Reputation: 15
try *

try to have entry in exports as

/tmp *(rw)

* indicates the whole world.
 
Old 02-28-2008, 01:28 PM   #5
sidra
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora Core 3, Red Hat 9, CentOS 4.2, Mandriva, Ret Hat Enterprise Linux 4.0
Posts: 116

Original Poster
Rep: Reputation: 15
Doesn't work, same error!
 
Old 02-28-2008, 04:08 PM   #6
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
hrm... I'm not on my normal network right now, so I don't remember the exact commands to tell, but are you sure NFS is running on the server? are you sure the exports are exporting (did you do an "exportfs -ra" - again, I don't remember if that's the exact command, but it's something like that). Do you have rpcd & mountd running on the server? There's some file in /proc that shows the exports... something like /proc/net/nfs/exportfs - an nfs howto would tell you... anyway, that's another good way to tell if nfs is running... is that there?

sorry to be so vague.
 
Old 02-28-2008, 11:53 PM   #7
harsshal
Member
 
Registered: Jul 2006
Location: New York, NY
Distribution: redhat,ubuntu,RHEL,fedora,centOS
Posts: 105

Rep: Reputation: 15
to start nfs

# /etc/init.d/nfs


To export the /usr/tmp directory to host harshal, allowing asynchronous writes, one would do this:

# exportfs -o async harshal:/usr/tmp


(oops.I'm using FC 8)

Last edited by harsshal; 02-28-2008 at 11:57 PM.
 
Old 02-29-2008, 12:42 AM   #8
jschiwal
Moderator
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,263

Rep: Reputation: 562Reputation: 562Reputation: 562Reputation: 562Reputation: 562Reputation: 562
For reference, here are 4 of my desktop's /etc/exports entries:
Code:
/home/jschiwal/podcasts 192.168.1.0/255.255.255.128(rw,root_squash,sync,no_subtree_check)
/home/jschiwal/music    192.168.1.0/255.255.255.128(rw,root_squash,sync,no_subtree_check)
/home/jschiwal/Documents        192.168.1.0/255.255.255.128(rw,root_squash,sync,no_subtree_check)
/home/jschiwal/downloads         192.168.1.0/255.255.255.128(rw,root_squash,sync,no_subtree_check)
Here are a couple corresponding entries in my laptop:
Code:
hpmedia.jesnet:/home/jschiwal/downloads /mnt/hpmedia/downloads          nfs     defaults,rsize=32768,wsize=32                           768,_netdev 0 0
hpmedia.jesnet:/home/jschiwal/Documents /mnt/hpmedia/Documents          nfs     defaults,rsize=32768,wsize=32                           768,_netdev 0 0

Also check your firewall settings, and read /var/log/messages for clues.

I wonder if SELinux might be denying the reading of /etc/exports or files in /var/lib/nfs/.
What does "showmount -e <hostname>" show?
 
Old 02-29-2008, 04:49 PM   #9
jdavis2
Member
 
Registered: Feb 2007
Distribution: Fedora, Mandrake, Knoppix, Windows XP
Posts: 37

Rep: Reputation: 15
Maybe this poster's solution could help you.
Disregard. Not the same issue.

Last edited by jdavis2; 02-29-2008 at 07:06 PM. Reason: Wrong context
 
Old 02-29-2008, 07:27 PM   #10
Loosewheel
LQ Newbie
 
Registered: Jan 2006
Location: Montana
Distribution: PCLinuxOS-2007
Posts: 24

Rep: Reputation: 15
sidra,
I have that problem, (permission denied), trying to access nfs shares on an Ubuntu box from a machine running PCLinuxOS. No problem what so ever accessing the nfs shares on PCL from Ubuntu.
If I run exportfs -a on Ubuntu box, I can then access the files.

This morning I had Ubuntu running for more than a hour before starting up PCL. And guess what. I was able to access the files.
 
Old 03-03-2008, 03:47 PM   #11
sidra
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora Core 3, Red Hat 9, CentOS 4.2, Mandriva, Ret Hat Enterprise Linux 4.0
Posts: 116

Original Poster
Rep: Reputation: 15
So are you saying you have nothing in your /etc/exports file and you are just doing exportfs -a, what is the exact command you are using?
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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
NFS: Permission Denied on mount RaelOM Linux - Server 7 11-14-2007 10:03 AM
NFS mount permission denied! naesyllek Linux - Networking 25 06-06-2007 04:24 AM
nfs mount: permission denied nocturna_gr Linux - General 13 02-12-2007 12:07 PM
NFS mount: Permission denied toreric Linux - Networking 15 03-03-2006 11:33 AM


All times are GMT -5. The time now is 01:32 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration