LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-09-2009, 02:18 PM   #1
chris24300
Member
 
Registered: Jul 2009
Posts: 58

Rep: Reputation: 15
Cannot mount NFS folder: permission denied


Hi,

I can no longer mount my NFS folder. I get mount failed, reason given by server: permission denied. I went onto my server and I brought up the NFS service and I already allow read/write to all hosts with ip of 10.10.10.*. Since all my computers on my network can no longer mount I decided to add the full IP and I was able to mount but every folder I saw had a pencil in hand with red circle and diagonal slash... After I went through the NFS server config I restarted nfs service and still nothing. I can ping my server, ssh to it, all hosts on my network are in my /etc/hosts file and mount info is in fstab... This all worked before and it suddenly just stopped.

Thanks!
Chris
 
Old 10-10-2009, 08:47 AM   #2
donanap
Member
 
Registered: Sep 2008
Location: Perth, Australia
Distribution: RedHat, Solaris
Posts: 38

Rep: Reputation: 15
More information

Hi,

What set up do you have? Can you post your /etc/exports file? Who are you mounting the file share as? and the folders that have the pencil and the circle and cross through it are because you don't have full permissions on these folders.. so what are the permissions on these folders?

Donanap
 
Old 10-11-2009, 07:40 PM   #3
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,226

Rep: Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022
Also,

exportfs -v
rpcinfo -p
 
Old 10-13-2009, 09:40 AM   #4
chris24300
Member
 
Registered: Jul 2009
Posts: 58

Original Poster
Rep: Reputation: 15
Thanks for your responses! My /etc/exports file is blank, there is nothing in it. I ran the command exportfs -v and it completed with no output and here is output of rpcinfo -p

Code:
rpcinfo -p
   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp    660  status
    100024    1   tcp    663  status
    100011    1   udp    958  rquotad
    100011    2   udp    958  rquotad
    100011    1   tcp    961  rquotad
    100011    2   tcp    961  rquotad
    100021    1   udp  32768  nlockmgr
    100021    3   udp  32768  nlockmgr
    100021    4   udp  32768  nlockmgr
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100021    1   tcp  57484  nlockmgr
    100021    3   tcp  57484  nlockmgr
    100021    4   tcp  57484  nlockmgr
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100005    1   udp   1001  mountd
    100005    1   tcp   1004  mountd
    100005    2   udp   1001  mountd
    100005    2   tcp   1004  mountd
    100005    3   udp   1001  mountd
    100005    3   tcp   1004  mountd
I'm running CentOS and the computer with the shared folder is Red hat. It's basically a shared folder that contains my code and documents so I can access them from any computer. I'm root on all machines. I've done all the same steps but now it gives me permission denied. The permission denied icon has never showed up before, it appeared when I added in a specific IP to the NFS service config.
 
Old 10-13-2009, 11:17 AM   #5
kapilbajpai88
Member
 
Registered: Jul 2008
Location: Bangalore, India
Distribution: RHEL
Posts: 235

Rep: Reputation: 41
Question

Hi Chris,

The IP change might be creating this problem, if it is a DHCP server (Dynamic IP). If it is Static IP, then until unless, it is already in use, you should not face any such problem.
Since you are the root over all the machines, and these steps didn't give you such problem earlier, then it can be assumed that the IP you have used is not accessing the network completely. Are you the person to select static IP address as well ? Is it a reserved IP address that you are trying to use ?

Regards,
Kapil
 
Old 10-13-2009, 12:12 PM   #6
chris24300
Member
 
Registered: Jul 2009
Posts: 58

Original Poster
Rep: Reputation: 15
I setup each machine in my DHCP tables through my router. Each machine has a unique IP.
 
Old 10-13-2009, 02:51 PM   #7
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,060

Rep: Reputation: 295Reputation: 295Reputation: 295
If the /etc/exports file is blank then no file systems will actually be exported and no clients will be able to mount them. You need to create valid information inthis file to tell the NFS server what to export. See "man 5 exports" for more details.
 
Old 10-13-2009, 06:18 PM   #8
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,226

Rep: Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022
Like he said; the entries have to be in /etc/exports, see the Deployment guide http://www.linuxtopia.org/online_boo...ion/index.html
 
Old 10-13-2009, 11:34 PM   #9
donanap
Member
 
Registered: Sep 2008
Location: Perth, Australia
Distribution: RedHat, Solaris
Posts: 38

Rep: Reputation: 15
Exports File.. I concur

Hi,

Ok, I concur with btmiller & chrism. Your exports file should not be blank.

Heres an example of what it should look like.

Code:
/media/cdrom 163.191.0.2 *(rw)
/data                   *(rw,sync,no_root_squash)
/home                   *(rw,sync,no_root_squash)
Definately look up your man pages for this though, as you will need to chose the options that suit you. hopefully this helps, if not let us know.

Donanap
 
Old 10-15-2009, 07:59 AM   #10
chris24300
Member
 
Registered: Jul 2009
Posts: 58

Original Poster
Rep: Reputation: 15
Ah, I made a mistake. I was looking at my /etc/exports file, not the file on the server. My server file is similar to the example only it has the same parameters as I entered in the NFS service config. Looks like this:

Code:
/share                               10.10.10.*(rw,sync,no_root_squash)
 
Old 10-15-2009, 07:26 PM   #11
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,226

Rep: Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022
Speaking of which, my cmds in post #3 need to be run on the exporting(!) server.
We might also need

iptables -nvL

cat /etc/hosts.allow
cat /etc/hosts.deny


ALL on server. Possibly iptables on client, but that's rare.
 
  


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
NFS mount permission denied sidra Linux - Networking 10 03-03-2008 03:47 PM
NFS mount permission denied! naesyllek Linux - Networking 25 06-06-2007 04:24 AM
nfs mount: permission denied kpachopoulos 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 07:12 PM.

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 Google+: linuxquestions
Open Source Consulting | Domain Registration