Operating System - HP-UX
1753285 Members
5414 Online
108792 Solutions
New Discussion юеВ

Re: Simple one - 65534 Owner Id's

 
SOLVED
Go to solution
Russ Hancock_1
Frequent Advisor

Simple one - 65534 Owner Id's

When root creates a file in a mounted directory, the ownership is set to 65534 ( not root )...

I'm sure there's a simple fix?

Thanks in advance.
Russ
Russ
2 REPLIES 2
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Simple one - 65534 Owner Id's

Hi Russ,

That should be an NFS mounted directory. You have to export the NFS mount with ' root' option otherwise root users will be treated as 'unknown' or nobodies. If you don't have a 'nobody' use on the system, then the files will get created using the id 65534.


-Sri
You may be disappointed if you fail, but you are doomed if you don't try
A. Clay Stephenson
Acclaimed Contributor

Re: Simple one - 65534 Owner Id's

Well, that's the answer but it isn't the whole answer. The conventional NFS anonymous/nobody UID is actually -2 --- but's that's 65534.

65534 is the twos-complement of -2 expressed as a 16-bit number. To represent negative numbers, you first make the ones-complement (flip even bit in the value expressed as a postitive number). You then add 1 to this value to get the twos-complement.

In our case we want -2 so we first express 2 as a binary 16-bit number.

0000000000000010 = 2
Now the ones-complement (flip every bit)
1111111111111101
Now the twos-complement by adding 1
1111111111111110 = 65534


And now you know the rest of the story.


If it ain't broke, I can fix that.