Operating System - HP-UX
1833776 Members
2449 Online
110063 Solutions
New Discussion

access denied mounting nfs

 
JRiggs
Occasional Contributor

access denied mounting nfs

Hi,

I have define the following in the host server:
client hostname at /etc/hosts
exported files system using sam
given full permission on the directories

but when I tried mounting it using root but got
" access denied" error...

Could anyone help me..

thanks,

jasper
The choices you get are the choices you make
8 REPLIES 8
JRiggs
Occasional Contributor

Re: access denied mounting nfs

hi,

the actual error was:

nfs mount: get_fn: host:/gm/tmp /tmp/gmrc: access denied


please advise if there are other things that i need to look at.

thanks in advance...
The choices you get are the choices you make
Patrick Wallek
Honored Contributor

Re: access denied mounting nfs

Verify that the contents of your /etc/exports file is correct. Try doing an 'exportfs -a' to re-export the file system and try re-mounting from your nfs client machine.
Bernard  Bravo
Advisor

Re: access denied mounting nfs

Hi,

I tried the error but, the same was encountered ...is there other way we could fix these.

please advise.

thanks.
Do good, Look Good, Feel Good
Varghese Mathew
Trusted Contributor

Re: access denied mounting nfs

Hi,

Access denied comes normally because of the wrong entry in /etc/exports file.

is your entry looks like these...

/archive2 -anon=65534
/export/informix/P1P -anon=65534


Hope this helps..

Cheers !!!
Mathew
Cheers !!!
Shahul
Esteemed Contributor

Re: access denied mounting nfs

Hi

I think this is the problem of /etc/exports file. Suppose If U want to export /users file system from hp1 to hp2 for root users, U should have an entry in /etc/exports like this

/users -root=hp2

then
check up both machins are pinging each other or not. Issue this command

#exportfs -a

Now ur file system is exported. U can verify by typing
#exportfs


Best of luck

shahul
Ajitkumar Rane
Trusted Contributor

Re: access denied mounting nfs

Hello,

You mentioned the entry in /etc/hosts for nfs exports you need to make a /etc/exports file which will contain the local filesystem to be exported.
1. can you telnet/ping the client on which you want to mount the file systems
2. If you feel doubtful about the /etc/exports file just use the command on the source host.
exportfs -i -o rw /gm/tmp.
(this way the filesystem is open to the world)
on the client
mount source host:/gm/tmp /tmp/gmrc
Also you need to check if your nfs daemons are running.You need to config the nfsconf file in /etc/rc.config.d

Goodluck.
Amidsts difficulties lie opportunities
A. Clay Stephenson
Acclaimed Contributor

Re: access denied mounting nfs

Hi Jasper,

There is one other thing that can cause problems like this - the permissions of the underlying mountpoint of the filesystem itself
on the NFS server. The permissions of the MOUNTED filesystem on the server may look fine
but those of the mointpoint might be owned by root and be very restrictive.

Clay
If it ain't broke, I can fix that.
Vincenzo Restuccia
Honored Contributor

Re: access denied mounting nfs

Check the mount options in the /etc/fstab file on the NFS client. A directory you are attempting to write to may have been mounted read-only.
Issue the ls -l command to check the HP-UX permissions on the server directory and on the client directory that is the mount point. You may not be allowed access to the directory.
Issue the following command on the NFS server:
/usr/sbin/exportfs
Or, issue the following command on the NFS client:
/usr/sbin/showmount -e server_name
Check the export permissions on the exported directory. The directory may have been exported read-only to your client. The system administrator of the NFS server can use the remount mount option to mount the directory read/write without unmounting it. See To Change the Default Mount Options.

If you are logged in as root to the NFS client, check the export permissions to determine whether root access to the directory is granted to your NFS client.
If you are logged in as root to the NFS client, and your client is not allowed root access to the exported directory, check the passwd database on the NFS server to determine whether it contains an entry for user nobody. Without root access, the root user on an NFS client is given the access permissions of user nobody. Also, check whether anonymous users are denied access to the directory (with the anon=65535 export option).

If your client is not allowed root access or anonymous user ID access to the exported directory, log in as a non-root user to get access to the directory.
If you are not running NIS or NIS+, or if the server is in a different domain from the client, check the passwd databases on the server and the client to make sure you have a valid login on both machines and that your user ID is the same on both machines. If your user ID is unrecognized on the NFS server, you will be granted the permissions of user nobody.
If you were attempting to run a program when you received the "permission denied" message, issue the ls -l command on the NFS server to check whether the program you tried to run has the setuid bit set. If it does, check /etc/fstab to determine whether the directory was mounted with the nosuid mount option. If necessary, remove the nosuid option from the /etc/fstab file, then unmount and remount the directory.