System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

user is nobody while creating any file or directory

SOLVED
Go to solution

user is nobody while creating any file or directory

Hi,

Getting problem in one of my production server. When I am creating any file or directory in a NFS mounted file system, it's owner is displayed as nobody. But I am a root in local machine.

drwxr-x--- 2 nobody sys 96 Aug 18 01:00 abc



Please help.
22 REPLIES
Dennis Handly
Acclaimed Contributor

Re: user is nobody while creating any file or directory

You only get nobody if you are root on an NFS client and you have exported the filesystem with the default "root is less than dirt" option. You would have to use: -o root=access_list
HP-UX_Ali
Regular Advisor

Re: user is nobody while creating any file or directory

Hello Shyam,

This is known for NFS mount point, if you create any file on NFS mounted fs and as local root access will give you nobdy ownership. if you want to get rid of it except root try to make the same user on the local machine & try to create file & directory. you will get the same ownership for the user.


Regards,
Ali

Re: user is nobody while creating any file or directory

Hi Dennis / Ali,

let me elaborate in detail about our setup. we have three production servers and there are 4 NFS mounted file systems on all these 3 servers (all 4 are same on 3 servers). These 4 mount points are exported from a NFS cluster which is having 2 nodes and hanfs is configured in that cluster.

My problem is that, out of 3 servers I can make any file or dir on 2 server's NFS file system but only one server is having this (nobody owner) problem.

Dennis Handly
Acclaimed Contributor

Re: user is nobody while creating any file or directory

>but only one server is having this (nobody owner) problem.

Is that server in the access_list on the NFS server? Does it have the FQDN?

Re: user is nobody while creating any file or directory

yes it has.
Dennis Handly
Acclaimed Contributor

Re: user is nobody while creating any file or directory

What HP-UX version are all of the machines?
What does nslookup show for the client, on both the server and on the client.

Re: user is nobody while creating any file or directory

HP-UX 11.11 on all servers.

Yes, both NFS server & Client is resolving FQDN of each other while nslookup.
Hakki Aydin Ucar
Honored Contributor
Solution

Re: user is nobody while creating any file or directory

hi,
your machine is on NIS and NIS is not running at given time for server which has this problem ?

Re: user is nobody while creating any file or directory

Hi Hakki,

The server on which the problem exists, is actually the nis master server. But when I give command ypwhich, it is saying

ypwhich
ypwhich: is not running ypbind

Now can you please assist for next, what to do?
Hakki Aydin Ucar
Honored Contributor

Re: user is nobody while creating any file or directory

- compare the configuration if other servers are different in file;
/etc/nsswitch.conf

- I found this link check it;
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=5898

- You can try these commands;
/sbin/init.d/nis.server start
/sbin/init.d/nis.client start

HP-UX_Ali
Regular Advisor

Re: user is nobody while creating any file or directory

Hello Shyam,

Once you try hakkin procedure, then kindly apply the below changes in your export file in NFS server.

/etc/exports
-root= ,anon=0 access=

Re-export the fs
exportfs

try to create the file or directory using root in client side & confirm. does it work or not.

Thanks

Regards
Ali



Re: user is nobody while creating any file or directory

Ali,

as I described earlier that NFS server is in cluster and these NFS file systems are exported through hanfs configuaration in cluster. So there is no /etc/exports file in NFS server. The file systems automatically exported while starting the package of the cluster.

Dennis Handly
Acclaimed Contributor

Re: user is nobody while creating any file or directory

>So there is no /etc/exports file in NFS server.

Then look at /etc/xtab to make sure it was exported correctly.

Re: user is nobody while creating any file or directory

on nfs server checked /etc/xtab file. it has no problem, all mount points are exported correctly.
Elmar P. Kolkman
Honored Contributor

Re: user is nobody while creating any file or directory

Please check the 'showmount -a' output on the NFS server for the specific client.

Even though you checked a lot, the NFS server is still not seeing the client as the client it should see... resulting in the 'nobody' problem.

Also, after changing settings, re-mount the filesystem on the client. Or, for testing, mount it again at a different location for the test and after seeing your problem is solved or not unmount it again.
Every problem has at least one solution. Only some solutions are harder to find.

Re: user is nobody while creating any file or directory

Hi Elmar,

showmount -a is giving correct output for this problematic nfs client. Also I have checked unmounting & remounting these nfs file systems on the client, but still same problem.
Hakki Aydin Ucar
Honored Contributor

Re: user is nobody while creating any file or directory

Hi,
are you able to restart nis server now ?

when you issue the command (rpcinfo command is used for troubleshooting purposes);
# rpcinfo -s

can you see ypbind and others ypxxxx processes to be sure NIS server processes are present ?

last, you can check the file /etc/nsswitch.conf consist of this line:
passwd: files nis

Re: user is nobody while creating any file or directory

Yes Hakki, I am able to restart nis server. Also checked rpcinfo -s , it is showing that ypbind and other ypxxxx processes are running.

checked /etc/nsswitch.conf file.
passwd: files nis entry is there.
Elmar P. Kolkman
Honored Contributor

Re: user is nobody while creating any file or directory

Are all NFS client processes running on the NFS client ?
(You can mount NFS without all processes running...)
And for this you don't need NIS. NIS is only needed when you are trying to use things like NFS v4 AND use users other then the local users. Your problem is with the root account, which shouldn't be in NIS anyway.
Every problem has at least one solution. Only some solutions are harder to find.

Re: user is nobody while creating any file or directory

yes, all NFS client processes are running on NFS client.
Hakki Aydin Ucar
Honored Contributor

Re: user is nobody while creating any file or directory

Hi,

Your NIS server is running so that apparently your issue does not seem like an NIS issue.

As far as I know, The root users on all other NFS clients are considered â unknownâ to the NFS server, so they are given the access privileges of user nobody.

As curiosity last thing you can check ;
By comparison with other servers, check /etc/publickey files if it is commented out the entry in the file for user nobody ?

Re: user is nobody while creating any file or directory

checked /etc/publickey file on all servers, but the line with entry nobody is not commented on any server.