Operating System - HP-UX
1753819 Members
9512 Online
108805 Solutions
New Discussion юеВ

Re: mount of the NFS share failing, when I try through my test code.

 
pranav026
Advisor

mount of the NFS share failing, when I try through my test code.

 

I have written a test code in C++ for mounting the NetApp NFS share on my HPUX 11.31 host. And it is failing with permission denied. I am running my process as root user. The same command works through commandline(shell). I even tried after restarting the services. Also I did not get any info around failure in syslogs. Can some one provide info around this?

 

Following is the comand I am trying to run through my test code,

 

/sbin/mount  -o ro "netapp3140a1:/vol/<vol_name>" "/mnt_pt"

 

nfs mount: netapp3140a1:/vol/<vol_name>: Permission denied

3 REPLIES 3
Dennis Handly
Acclaimed Contributor

Re: mount of the NFS share failing, when I try through my test code.

I assume you are using system(3) to invoke mount?

Have you tried using tusc to see where the error occurs?

pranav026
Advisor

Re: mount of the NFS share failing, when I try through my test code.

I am using fork+exec combination to exectute the mount command. I will check tusc, if it helps. Do I need to check any NFS options/package versions for any probable fix?

Dennis Handly
Acclaimed Contributor

Re: mount of the NFS share failing, when I try through my test code.

>Do I need to check any NFS options/package versions for any probable fix?

 

You said it worked from the command line, that's not something an option would prevent working, especially if you are root.  I assume you aren't in that directory when you try to mount?