Operating System - HP-UX
1833780 Members
2201 Online
110063 Solutions
New Discussion

NFS mount : sh: /common: Permission denied.

 
Nikee Reddy
Regular Advisor

NFS mount : sh: /common: Permission denied.

Hello,

I am trying to mount a file system /common in the following manner:

NFS server: orion
NFS cients: jupiter (trying to solve the prob)
NFS cients: neptune (I am able to mount on this system successfully)

root@jupiter:/#showmount -e orion
export list for orion:
/export/common orion,neptune,jupiter


root@jupiter:/etc# more auto_master
/net -hosts -nosuid,soft
/- /etc/auto.direct

root@jupiter:/etc# more auto.direct
/common orion:/export/common

root@jupiter:/# more /etc/rc.config.d/nfsconf
NFS_CLIENT=1
NFS_SERVER=1
NUM_NFSD=8
NUM_NFSIOD=12
PCNFS_SERVER=0
AUTOMOUNT=1
AUTO_MASTER="/etc/auto_master"
AUTO_OPTIONS="-f $AUTO_MASTER"


I have created the following directories also:
/common
/tmp_mnt/common
-----------------------------------------------
root@neptune:#/sbin/init.d/nfs.client start
starting NFS CLIENT networking

killing rpc.lockd
killing rpc.statd
killing nfsd
killing rpc.mountd
starting up the rpcbind
rpcbind already started, using pid: 505
starting up the BIO daemons
/usr/sbin/biod 12
starting up the Status Monitor daemon
/usr/sbin/rpc.statd
starting up the Lock Manager daemon
/usr/sbin/rpc.lockd
starting up the Automount daemon
/usr/sbin/automount -f /etc/auto_master
mounting remote NFS file systems ...
starting NFS SERVER networking

starting up the rpcbind daemon
rpcbind already started, using pid: 505
starting up the mount daemon
/usr/sbin/rpc.mountd
starting up the NFS daemons
/usr/sbin/nfsd 8
starting up the Status Monitor daemon
rpc.statd already started, using pid: 3597
starting up the Lock Manager daemon
rpc.lockd already started, using pid: 3603

-----------------------------------------------
The nfs client started successfully but the exported file system /common is not mounted.

when I tried to access /common file system, the system is responding with the following error message:
root@jupiter:/# cd /common
sh: /common: Permission denied.


root@jupiter:/# ll /common
lrwxrwxrwx 1 root root 20 Jul 1 11:14 /common

/common is not properly link. It should suppose to show like:
root@neptune:/# ll /common
lrwxrwxrwx 1 root root 20 Jul 14 11:15
/common -> /tmp_mnt/common

"I could able to mount on the neptune system but not on the jupiter system"

I really appreciate your solutions.

Thanks,
Nikee
9 REPLIES 9
Steve Steel
Honored Contributor

Re: NFS mount : sh: /common: Permission denied.

Hi

On Jupiter

ll -d / /tmp_mnt /tmp_mnt/common


One of them has bad permissions


compare with neptune


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Nikee Reddy
Regular Advisor

Re: NFS mount : sh: /common: Permission denied.

Hello Steve,

I have verified the permissions. Looks good.

Thanks,
Nikee
Massimo Bianchi
Honored Contributor

Re: NFS mount : sh: /common: Permission denied.

Hi,
i think that this is the problem:

"I have created the following directories also:
/common
/tmp_mnt/common
"


let the automounter create /tmp_mnt/common .


Stop NFS, clean /tmp_mnt and restart NFS client.


HTH,
Massimo

Nikee Reddy
Regular Advisor

Re: NFS mount : sh: /common: Permission denied.

Hi Massimo,

I stopped the NFS client, deleted the /tmp_mnt/common directory and sarted the NFS client.

Same error:
root@jupiter:# cd /common
sh: /common: Permission denied.

Thanks,
Nikee
Paul Sperry
Honored Contributor

Re: NFS mount : sh: /common: Permission denied.

I had the same problem and it turned out to be a name resolution issue. check /etc/hosts on both server and client. Try nslookup on client and server to see if they are resolving one another.

Good luck.
Massimo Bianchi
Honored Contributor

Re: NFS mount : sh: /common: Permission denied.

Hi,
try removing also
- stop NFS
- remove the /common
- start NFS

and be sure to grant proper permission in the export:
/common -access=host:host,root=host:host


HTH,
Massimo

Kevin Wright
Honored Contributor

Re: NFS mount : sh: /common: Permission denied.

Kill all your nfs deamons on the client. Set AUTOFS to 1 in nfsconf file, and restart nfs.client. you should have nfsd's, autofs_proc, and an automountd deamon running.

then cd to /common. AUTOFS doesn't use the stupid /tmp_mnt link setup.
Una Hennigan
New Member

Re: NFS mount : sh: /common: Permission denied.

Hi there,
Whenever I get this problem I always run exportfs from the originating server ie the server with the updated /etc/exports file on it.
This usually allows me to mount the filesystem on the remote server.
Regards, Una
Todd McDaniel_1
Honored Contributor

Re: NFS mount : sh: /common: Permission denied.

Nikee,

Dont know if you solved this problem but it sounds like a problem I had with the /etc/exports file...

It is a DNS name problem, I had a box which had in the /etc/exports and the actual box DNS was called .

Then type exportfs at the root prompt:

#man exportfs
DESCRIPTION
The exportfs command makes a local directory or file available to NFS
clients for mounting over the network. Directories and files cannot
be NFS-mounted unless they are first exported by exportfs.
Unix, the other white meat.