Owner 99

Earlier today someone had a problem where all the files in their directories that were previously owned by their username instead showed a number.

There are a few things that could cause this. The first is that if you delete a user from a server and that user has files that are still remaining on the server, then it will default the the owners user number, instead of their username (since they no longer exist).

The second way this could happen would be if someone edited the number of the user by going into /etc/passwd and changing it to a different number. The files are now associated with a number that has no user and thus it doesnt know the name of the owner so it just defaults to the number that last owned them.

To resolve this you can go into the base directory that you want the owner of the files changed and type the following command in a shell (might use telnet or ssh and probably need root permission):

chmod -R username.usergroup ./

That will effectively change the user and group of all the files under that directory recursively. If you wish to just change one file or directory you could type:

chmod username.usergroup filename

You can also type less if you want to keep the group owner to what it was before:

chmod username filename
-or-
chmod -R username ./

COUNTER