cancel
Showing results for 
Search instead for 
Did you mean: 

mount to NFS - permission denied

SOLVED
Go to solution
ng_7
Regular Advisor

mount to NFS - permission denied

hi, me again,
i have a file system call backup located in serverA, i wanted to mount this directory to
serverB /dbbkp, below are the step i run.

1. below is my serverA etc\exports
/prod
/tmp
/u1
/backup/share1
/backup

2. serverA fstab
/dev/vg03/backup /backup vxfs rw,suid,largefiles,delaylog,datainlog 0 2

3. i run exportfs in serverA, and i get :
db1:/etc# exportfs
/prod
/tmp
/u1
/backup/share1

the /backup not seem to be able to export.

4. i mount /backup to dbbkp in serverB
mount db1:/backup /dbbkp

and I got this : Permission denied

how do i solve this ?
Note : subdirectory under /backup is able to mount.

thanks

Regards
ng




11 REPLIES
Steven E. Protter
Exalted Contributor

Re: mount to NFS - permission denied

Shalom,

Check permissions on the directory:

ll -d /backup/

Check ownership as well.

Check the /var/adm/syslog/syslog.log on the server.

Make sure the folder exists and check the permissions on the client.

If the server box is Linux make sure the no_root_squash parameter is set in /etc/exports.

Note:
/dev/vg03/backup /backup vxfs rw,suid,largefiles,delaylog,datainlog 0 2

largefiles is not supported in /etc/fstab after 11.11 HP-UX. The mount program figures it out for itself after that release.

Any of the above issues could be the problem here.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
ng_7
Regular Advisor

Re: mount to NFS - permission denied

on serverA
ll -d backup
drwxrwxrwx 7 root root 8192 Jun 12 18:18 backup

on serverB
ll -d dbbkp
drwxrwxrwx 2 root sys 96 Jun 13 11:23 dbbkp

and no error shown in syslog.log in either server and client.

i am able to mount to serverA : /backup/subdir but not able to mount to serverA /backup

thanks





Reshma Malusare
Trusted Contributor

Re: mount to NFS - permission denied

Hi,
Check /etc/hosts file.
Then also check NFS configuration:

start /sbin/init.d/nfs.core --> which will starts rpcbind

On NFS Server:
1> Ensure NFS subsystem is in the kernel
2>edit /etc/rc.config.d/nfsconf
3>start NFS daemon
/sbin/init.d/nfs.server start
4> /etc/exports
5> export directories

On NFS Client:
1> Ensure NFS subsystem is in the kernel
2>edit /etc/rc.config.d/nfsconf
3>start NFS daemon
/sbin/init.d/nfs.client start
4> /etc/fstab
5>mount the NFS file system.

NOTE: Keep time synchronised with all nodes.

Thanks & Regards
Reshma
ng_7
Regular Advisor

Re: mount to NFS - permission denied

hi, Reshma,

the NFS is in my kernel subsystem, please note that i am able to mount to serverA:\backup but not the subdirectory of the serverA:\backup. I can mount any of the subdirectory in the \backup but not the overall \backup file system.

thanks

ng
V. Nyga
Honored Contributor

Re: mount to NFS - permission denied

Hi,

first, I would delete the line '/backup/share1' in the exports file, because you don't need to export a subdir. Maybe this stops the export of /backup itself.
Do an 'exportfs -a'.

If /backup doesn't appear, try
'/backup -anon=0' in the exports file.

You're sure, that on serverA your source device is '/dev/vg03/backup' not '/dev/vg03/lvolx'?

Volkmar
*** Say 'Thanks' with Kudos ***
ng_7
Regular Advisor

Re: mount to NFS - permission denied

modified /etc/exports as shown below :

/prod
/tmp
/u1
/backup -anon=0

and try to do
/etc# exportfs -a
exportfs error: /backup: sub-directory (/backup/share1) already exported

and also try : exportfs
output :
/backup/share1
/prod
/tmp
/u1

looks like /backup/share1 can't be removed.

You're sure, that on serverA your source device is '/dev/vg03/backup' not '/dev/vg03/lvolx'?
yes

bdf
dev/vg03/backup 102400000 87578416 14706480 86% /backup

thanks


Dennis Handly
Acclaimed Contributor
Solution

Re: mount to NFS - permission denied

>looks like /backup/share1 can't be removed.

You have to do it manually:
# exportfs -u /backup/share1
ng_7
Regular Advisor

Re: mount to NFS - permission denied

thanks Dennis, i am able to remove it now, but pls look at below, if i add /backup and /backup/share1 into exports

/prod
/tmp
/u1
/backup
/backup/share1

c my output of exportfs
/prod
/tmp
/u1

both /backup and /backup/share1 is not exported. does it mean that we can't have that settings ?

thanks

ng
Dennis Handly
Acclaimed Contributor

Re: mount to NFS - permission denied

>my output of exportfs

You need to do exportfs -a again.

>both /backup and /backup/share1 is not exported. does it mean that we can't have that settings?

You should be have to have one of them. I don't know if you can have two, or only if you order the entries as you have now?
V. Nyga
Honored Contributor

Re: mount to NFS - permission denied

Hi again,

I think your error message already says all:
exportfs error: /backup: sub-directory (/backup/share1) already exported

If you have a sub-dir exported exportfs gives an error.
So please try again without /backup/share1.

V.
*** Say 'Thanks' with Kudos ***
ng_7
Regular Advisor

Re: mount to NFS - permission denied

hi all, i managed to solved the problem with all your solution.

thank you very much