Operating System - HP-UX
1837581 Members
2944 Online
110117 Solutions
New Discussion

Re: mount NFS locally - permission denied

 
BrianDoyle
Trusted Contributor

mount NFS locally - permission denied

Hi,
On my HPUXv3 box im trying to mount an exported TRU64 directory.

#showmount -e shows the correct filesytem.

It's listed in the client fstab
nfs_tru64server_ip:/dir /mount_point nfs nointr,noac,forcedirectio,rw,bg,suid 0 0

mount -F nfs nfs_server_ip:/dir /mount_point gives the message:
nfs mount: ip_address:/dir: Permission denied

Any thoughts where the problem is?
12 REPLIES 12
MarkSyder
Honored Contributor

Re: mount NFS locally - permission denied

The first thought that occurs is that the filesystem has not been exported from the remote box.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Sajjad Sahir
Honored Contributor

Re: mount NFS locally - permission denied

make an entry in /etc/exports file

eg:
/home/sajjad/tmp1 -access=server2
exportfs -a

check the file permission of /home/sajjad/tmp1
ls -l /home/sajjad/tmp1
give proper permission for that directory
this is the root cause u are getting permission denied error
check u true64 directory i am sure u diddn't give proper permission for that directory just give grant permission
then try
in server2
make a dir
tmp2
mount server1:/home/sajjad/tmp1 /tmp2

cd /tmp2
u can see u file there
Matti_Kurkela
Honored Contributor

Re: mount NFS locally - permission denied

Can the server host (TRU64) resolve the name of the client (HPUX) correctly?

Verify by running these commands on the NFS server (TRU64):
nslookup
nslookup

Both nslookup commands should give the same name & address pair as a result. If not, you have a DNS problem.

Also check the /etc/hosts file on the tru64 server: if it has obsolete information, it may locally override the good information in DNS.

MK
MK
BrianDoyle
Trusted Contributor

Re: mount NFS locally - permission denied

Mark>
The filesystem has been exported from the tru64 server (exportfs -a)

Sajjad>
Im using 11iv3 so theres no /etc/exports file. It uses dfstab instead. I appreciate the post though.

Matti>
Name resolution is fine from both sides, by hostname and IP. hosts file also
BrianDoyle
Trusted Contributor

Re: mount NFS locally - permission denied

The directory i want to share looks like this:

drwxr-xr-x 3 500 dba 8192 Nov 6 15:49 tmpsso

Are permissions and owner/group details ok?
Sajjad Sahir
Honored Contributor

Re: mount NFS locally - permission denied


dear

can u remount it again
i mean stop mount
then remount then it will get rw permission


sajjad
Sajjad Sahir
Honored Contributor

Re: mount NFS locally - permission denied


dear

can u give grant permission to that file
i mean chmod 777 then just check it
please revert back

sajjad
Sajjad Sahir
Honored Contributor

Re: mount NFS locally - permission denied


dear

can u give grant permission to that file
i mean chmod 777 then just check it
please revert back also
can u mount wiht hostname not an ip

sajjad
MarkSyder
Honored Contributor

Re: mount NFS locally - permission denied

Quote: Sajjad>
Im using 11iv3 so theres no /etc/exports file. /Quote

I think Sajjad was referring to the /etc/exports file on the TRU64 box, not the HP-UX box.

Mark
The triumph of evil requires only that good men do nothing
Sajjad Sahir
Honored Contributor

Re: mount NFS locally - permission denied


Dear Slyder

it was by mistakely happened


thanks and regards

sajjad
BrianDoyle
Trusted Contributor

Re: mount NFS locally - permission denied

Sorry Sajjad, didnt realize you referred to the server.

I tried to mount with the hostname. Changed teh permissions to 777 and root:sys. Still the same - permission denied.

It's a strange one.....

nfs_server# showmount -e
Exports list on localhost:
/tmpsso client1 client2

so everythings ok there.
i exported it out to a different tru64 server and it worked but still cant mount it on hpux

Does this look ok? in fstab
nfs_tru64server_ip:/dir /mount_point nfs nointr,noac,forcedirectio,rw,bg,suid 0 0
BrianDoyle
Trusted Contributor

Re: mount NFS locally - permission denied

Changed the hosts file on the nfs server from hostname to IP and it worked again.

Still puzzled why this made any difference but a fix is a fix. hostame resolving can be tricky

Many thanks to all who contributed.

briano