Operating System - HP-UX
1752780 Members
6298 Online
108789 Solutions
New Discussion юеВ

NFS, why I can not list the contents?!

 
SOLVED
Go to solution
Victor_5
Trusted Contributor

NFS, why I can not list the contents?!

I met a very strange problem.

Background:
I set up a NFS through SAM a couple of monthes ago, the file system located in NT server, which name is mis_server, the directory on NT is /E/NFS, here is the bdf said:
mis_server:/E/NFS 26627708 3195264 23432444 12% /usr/NFS

The original problem is:
When I try to change some files permission, it failed.
For example:
chmod 777 filename
chmod: can't change filename: Not owner

I knew the reason why I can not do it is that the UNIX box only is a client in this case, so I did the following step:
1. umount /usr/NFS
2. exportfs -va
3. in /etc/rc.config.d/nfsconf
changed "PCNFS_SERVER=0" to "1"
4. /sbin/init.d/nfs.client stop
5. /sbin/init.d/nfs.server stop
6. /sbin/init.d/nfs.client start
7. /sbin/init.d/nfs.server start

After that, I can see /usr/NFS through bdf or mount -v, however, one more question happened.

I can not list the contents of /usr/NFS

cd /usr/NFS
ll
It says "Total 0"

However, if I go to the sub-directory, it is OK although I still can not change the permission. For example:
cd /usr/NFS/flash
ll
It says:
total 110
----rwxrwx 1 nobody 4294967295 81 Jul 12 14:24 cgflash.txt
----rwxrwx 1 nobody 4294967295 90015 Jul 12 14:24 fsdet.txt
...

I really confused, anybody has clue?
9 REPLIES 9
Patrick Wallek
Honored Contributor
Solution

Re: NFS, why I can not list the contents?!

Unless other machines are mounting directories from this machine via NFS do a:

/sbin/init.d/nfs.server stop

There is no reason for the NFS server daemons to be running. They aren't accomplishing anything.

After you do that try doing an ls or ll again and see what happens.
A. Clay Stephenson
Acclaimed Contributor

Re: NFS, why I can not list the contents?!

Hi Shawn,

Patrick is correct there is no need for your unix box to be an NFS server.

You did not mention which NFS server package for NT that you are using. We use Omni/NFS from Xlink Technologies and it requires that you provide a mapping of uid's to NT users. This mapping is done on the NT server and could be the source of your problems.

The other thing I would do is unmount the NFS
share on the unix box and look at the permissions of the mountpoint. Change them to 777 and remount the share.

Hope this helps, Clay
If it ain't broke, I can fix that.
Victor_5
Trusted Contributor

Re: NFS, why I can not list the contents?!

I will do it tonight and let your guys know the result. Thanks a lot in advance.
Victor_5
Trusted Contributor

Re: NFS, why I can not list the contents?!

Because nobody are using nfs server, I did the following steps a few minutes ago:

/sbin/init.d/nfs.server stop
killing nfsd
killing rpc.mountd

Then ll again, nothing changed.

Any more idea?
Edgar Matzinger
Advisor

Re: NFS, why I can not list the contents?!

hi,

how is the authentication arranged between the NT server and HP-UX? Is the directory exported for root on the NT box? Is the directory readable/writable by anyone?

Just more questions, and no solutions ;-)

cu l8r, Edgar.
Patrick Wallek
Honored Contributor

Re: NFS, why I can not list the contents?!

Do the following on your unix box:

umount /usr/NFS
ll -d /usr/NFS
(If permissions are anything other than drwxrwxrwx for /usr/NFS do a 'chmod 777 /usr/NFS')
mount /usr/NFS
ll -d /usr/NFS
(check permissions and owner/group on /usr/NFS again, make sure you have appropriate permissions to do what you need to do)
cd /usr/NFS
bdf .
ll

If you could send the output of the above if it still doesn't work, it may help us to better help you.
Victor_5
Trusted Contributor

Re: NFS, why I can not list the contents?!

Just now, I did a test to confirm my assumption: I should do something on NT side.

# umount /usr/NFS
# mkdir /usr/NFSNT (another new mount point for same file system)
# mount mis_server:/E/NFS /usr/NFSNT

The result was exactly same with the previous one.

Here is the output following Patrick's suggestion:
# umount /usr/NFS
# ll -d /usr/NFS
drwxrwxrwx 2 root sys 96 Jul 12 12:12 /usr/NFS
# mount /usr/NFS
# ll -d /usr/NFS
d------rwx 2 root root 64 Jul 12 10:31 /usr/NFS
(Unfortunately, the permissions are not what I am looking for)
# cd /usr/NFS
# bdf .
Filesystem Kbytes used avail %used Mounted on
mis_server:/E/NFS 26627708 3217056 23410652 12% /usr/NFS
# ll
total 0

Thanks a lot for your helps!
A. Clay Stephenson
Acclaimed Contributor

Re: NFS, why I can not list the contents?!

Hi Shawn,

One one your ll listings is crucial:
ll -d /usr/NFS
d------rwx 2 root root 64 Jul 12 10:31 /usr/NF

Notice that the directory is owned by root by root does not have read, write, or search permission on that mounted directory. If your NT NFS server has a feature like allow root access, you need to enable it. It would appear that a non-root, non-root group user could do an ll -d /usr/NFS and would get a listing.
You have some permissions setup work on the NT side to do.

Clay
If it ain't broke, I can fix that.
Victor_5
Trusted Contributor

Re: NFS, why I can not list the contents?!

Here is the solution.

This morning I talked to one of our senior NT adms, he checked the NFS server on NT side, and let me to go to /NFS directly instead of /E/NFS:

umount /usr/NFS
mount mis_server:/NFS /usr/NFS

It works. Obviously the bug is on the NT box.

Many thanks for your guys help. Patrick, Clay, you are very helpful, thanks a lot. You are real experts!