Operating System - HP-UX
1834149 Members
2280 Online
110064 Solutions
New Discussion

NFS on 11iv2 - "unable to create"

 
SOLVED
Go to solution
maxell_1
Frequent Advisor

NFS on 11iv2 - "unable to create"

Hi Guys,

I have been trying to share and give read-write access of my /home folder using NFS but seemed to get error. The NFS server's hostname is "NFSServer" and the NFS client's is "NFSClient". This is the scenario:

On Server:
1) I have this entry in /etc/exports
/home rw=NFSClient
2) # exportfs -a

On Client:
3) I have this entry in /etc/fstab
NFSServer:/home /backup nfs rw 0 0
4) mkdir /backup
5) mount -aF nfs

I could see the /home folder of the NFSServer in the /backup mountpoint of the NFSClient. But whenever I created a file in the /backup folder, I would get an error, "unable to create" or "permission denied". Why is this so since I have already used the "rw" option in step (1) above.

Please help.

Thanks
13 REPLIES 13
Tim Nelson
Honored Contributor

Re: NFS on 11iv2 - "unable to create"

1) did the NFS really mount ? post output of bdf /backup

2) Does your userid have permissions to write into this NFS mount ? post output of ls -la /backup





Tim Nelson
Honored Contributor

Re: NFS on 11iv2 - "unable to create"

And....

what user are you when you try to write into the NFS mount ? If it is root then you need to export the filesystem with root permissions, e.g. root=NFSClient

Wouter Jagers
Honored Contributor

Re: NFS on 11iv2 - "unable to create"

Hiya,

If you are logged in as root on the client system that would be normal. For safety reasons root access is not allowed through nfs, except if you add the option "root=NFSClient" in your configuration.

Otherwise, double check the account you're logged in as. It is important that your uid (not the username) is the same on both systems for similar access.

Cheers,
Wout
an engineer's aim in a discussion is not to persuade, but to clarify.
maxell_1
Frequent Advisor

Re: NFS on 11iv2 - "unable to create"

Hi Tim,

1) Yes the NFS is mounted. I can view the files mounted in the /backup directory from the NFSClient.

2) I am using root as the when writing into the NFS mount in the /backup directory.

I have tried to use "root=NFSClient" option in the /etc/exports of NFSServer but when I execute "mount -aF nfs" in the NFSClient, I got "permission denied".

Any other things that I overlook?
Wouter Jagers
Honored Contributor

Re: NFS on 11iv2 - "unable to create"

You did combine both options, right ?

/home rw=NFSClient,root=NFSClient

Cheers,
Wout
an engineer's aim in a discussion is not to persuade, but to clarify.
maxell_1
Frequent Advisor

Re: NFS on 11iv2 - "unable to create"

Hi Wout,

I only have the "root=NFSClient" entry.

Tried so far are:

1) "rw=NFSClient"
Outcome: can mount but cannot write to the NFS mount

2) "root=NFSClient"
Outcome: cannot mount with "permission denied" error.

Thanks,
haimi
Tim Nelson
Honored Contributor

Re: NFS on 11iv2 - "unable to create"

You probably need both entries.

rw=host,root=host

or

access=host,root=host

maxell_1
Frequent Advisor

Re: NFS on 11iv2 - "unable to create"

Hi Tim,

Ok I will try your suggestion and update you guys. Thanks!
maxell_1
Frequent Advisor

Re: NFS on 11iv2 - "unable to create"

Hi Tim,

I have tried both the options in /etc/exports and I still am getting "permission denied" when running "mount -a" in NFSClient.

Current config of NFSServer.
1) In /etc/exports
/home/tom access=NFSClient,root=NFSClient
2) # ls -l /home
drwxr-xr-x 2 tom users 96

Current config of NFSClient.
1) In /etc/fstab
NFSServer:/home/tom /home/tom nfs rw 0 0

Any help please. Thanks.
Dennis Handly
Acclaimed Contributor

Re: NFS on 11iv2 - "unable to create"

>Current config of NFSServer.

Have you done "exportfs -a" after you changed /etc/exports?
What is the content of /etc/xtab?

Is the networking set up so every machine agrees who is NFSClient? Is it a fully qualified DNS name?
maxell_1
Frequent Advisor

Re: NFS on 11iv2 - "unable to create"

Hi,

Yes I have executed "exportfs -a". The contents of /etc/xtab are as follow:

/home/tom -access=rw=NFSCLient,root=NFSClient

I only use /etc/hosts file for name resolution and both the server hostnames are in the /etc/hosts of each server.
Dennis Handly
Acclaimed Contributor
Solution

Re: NFS on 11iv2 - "unable to create"

>/home/tom -access=rw=NFSCLient,root=NFSClient

This isn't a valid format for exports(4), assuming xtab(4) matches?
You shouldn't have -access AND rw.
It exports(4) should just have:
/home/tom -access=NFSCLient,root=NFSClient
maxell_1
Frequent Advisor

Re: NFS on 11iv2 - "unable to create"

Hi Dennis,

That does the job! It is the options used that made me crazy.

Now using "-access=NFSClient" does the job perfectly.

Thanks and thanks to all for the help.