1834760 Members
3449 Online
110070 Solutions
New Discussion

Re: nfs

 
khilari
Regular Advisor

nfs

Hi people, well i am having some problems with nfs. When i use the command
mount server1:/tmp/yahoo /yahoo1 on the client server i get the error Permission denied. Now i changed the permissions on the /etc/exports as chmod 777 /etc/exports and in the /etc/exports file i put in the entry as
/tmp/yahoo rw. So, i really dont know why i am getting this error.
9 REPLIES 9
A. Clay Stephenson
Acclaimed Contributor

Re: nfs

Simply putting entries in an /etc/exports file does nothing; you must also execute the exportfs command on the server.

If it ain't broke, I can fix that.
HGN
Honored Contributor

Re: nfs

Hi

You can try this

On server where it is being exported
#/sbin/init.d/nfs.server stop
#/sbin/init.d/nfs.server start

On client where it is being mounted
#/sbin/init.d/nfs.client stop
#/sbin/init.d/nfs.client start

Hope this helps

Rgds

HGN

HGN
Honored Contributor

Re: nfs

Hi

You can run the exportfs -a command to export it out

Rgds

HGN
khilari
Regular Advisor

Re: nfs

Hi people, i have tried it all. I used exportfs -a. When i run exportfs i see the entries. I have already started nfs.client and nfs.server. I can see the rpc and nfsd daemons running on both.
A. Clay Stephenson
Acclaimed Contributor

Re: nfs

One of the things that can cause you kind of problem is very restrict permissions on the mountpoint. You need to unmount the filesystem on the server side and make sure that the permissions are not something like 0700 but rather something like 0755 then mount the filesystem and export it. The same applies to the client's mountpoint.

What is the output of the exportfs command on the server? Without arguments, exportfs will display the list of currently exported filesystems.

Next your mount command is incorrect:
mount server1:/tmp/yahoo /yahoo1

should be:
mount -F nfs server1:/tmp/yahoo /yahoo1

If it ain't broke, I can fix that.
khilari
Regular Advisor

Re: nfs

well, i did that changed the permissions on both directories, but the same error permission denied is coming. I changed the mount to and added -F nfs, but nothing happened. Same error.
A. Clay Stephenson
Acclaimed Contributor

Re: nfs

I rather doubt that because you would almost certainly have had to shutdown the server in order to umount /tmp on the server box. You should really try to export another filesystem because /tmp is a poor choice. Choose one that can be easily unmounted on the NFS server. You also did not post the output of the exportfs command.
If it ain't broke, I can fix that.
khilari
Regular Advisor

Re: nfs

i just made up a directory in the root filesystem and then a file under it. tesnfs/yahoo and tried to export it to another system. I changed its permissions to 0755 by chmod 0755 and thats it. I am still getting the permission denied error.
Patrick Wallek
Honored Contributor

Re: nfs

Did you add it to your /etc/exports file? What does your /etc/exports look like?