LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cannot mount NFS folder: permission denied (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-mount-nfs-folder-permission-denied-760838/)

chris24300 10-09-2009 02:18 PM

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

donanap 10-10-2009 08:47 AM

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

chrism01 10-11-2009 07:40 PM

Also,

exportfs -v
rpcinfo -p

chris24300 10-13-2009 09:40 AM

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.

kapilbajpai88 10-13-2009 11:17 AM

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

chris24300 10-13-2009 12:12 PM

I setup each machine in my DHCP tables through my router. Each machine has a unique IP.

btmiller 10-13-2009 02:51 PM

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.

chrism01 10-13-2009 06:18 PM

Like he said; the entries have to be in /etc/exports, see the Deployment guide http://www.linuxtopia.org/online_boo...ion/index.html

donanap 10-13-2009 11:34 PM

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

chris24300 10-15-2009 07:59 AM

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)

chrism01 10-15-2009 07:26 PM

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.


All times are GMT -5. The time now is 06:43 AM.