[comp.unix.aix] chown gives misleading error message

compata@cup.portal.com (David H Close) (09/06/90)

larry@morpho.UUCP wrote that he was having trouble changing ownership of
a file of which he was the owner.

I also noticed that chown would not allow me to change the ownership of
a file which I owned.  The message was ~"must be owner or root".  Of course,
I was the owner!  Running as root bypassed the problem.

Calling AIX defect support, I learned that the message is a compromise
and does not accurately define the problem.  As I recall (my memory is
unclear), the actual problem related to the group set.  Either I or the
intended new owner were not in the defined group.  You might check the
group set (with smit) to insure those are defined properly.

Actually, my memory partially returns.  My problem was with chgrp, not
chown.  So maybe my answer isn't really appropriate after all.  Try it,
maybe there's a clue in here somewhere.

Dave Close, Compata, Arlington, Texas
compata@cup.portal.com
compata@mcimail.com

jeffe@sandino.austin.ibm.com (Peter Jeffe 512.823.4091) (09/07/90)

In article <33593@cup.portal.com> compata@cup.portal.com (David H Close) writes:
>I also noticed that chown would not allow me to change the ownership of
>a file which I owned.  The message was ~"must be owner or root".  Of course,
>I was the owner!  Running as root bypassed the problem.

This message is a verbose but perhaps equally vague translation of the good
old EPERM ("Not owner") message; you can set your LANG environment variable
to C if you'd rather get the old messages instead of the "Standardized
English" ones that are produced by LANG=En_US.

In any case, chown() has always returned EPERM if you have insufficient
privileges.  If you want to find fault with the poor overworked errlst
messages, then post to comp.unix, but please don't ask IBM to mess with
them any more than they already have!

-------------------------------------------------------------------------------
Peter Jeffe   ...uunet!cs.utexas.edu!ibmaus!auschs!sandino.austin.ibm.com!jeffe
        first they want a disclaimer, then they make you pee in a jar,
                   then they come for you in the night