CentOS 6.x / OpenVZ

Recently my VPS provider moved my OpenVZ container to a new server. After that move, I've noticed that files/directories for one of my user accounts show an odd owner / group.

For example I'll see stuff like this:

[root@exampleserver ~] ls -l /home/foouser
-rw-rw-r-- 1 65534 65534 370123 Jan 1  2014 ExampleFile.txt

I'd expect to see "foouser" as the owner/group instead of 65534.

Likewise, when I try switching to the user, I get an error:

[root@exampleserver ~] su - foouser
su: warning: cannot change directory to /home/foouser: Permission denied
-bash: /home/foouser/.bash_profile: Permission denied

My guess is that some numeric identifier for the user accounts didn't persist with the move so now my user account isn't associated with old files.

What would cause this and how can I fix it?


65534 is some kind of default/nobody UID & GID value. Your VPS provider made some sort of mistake when they copied over your container. For example they used rsync but failed to use its --numeric-ids option.

The user IDs inside your container don't exist outside the container and some copy tools, upon seeing UIDs and GIDs that they can't resolve, revert them to defaults. That's how this kind of mistake can happen. A competent virtualization provider shouldn't make that mistake though.

Your options are:

  • chown/chgrp all the files back to what they should be. However, the information on what the original owners and groups were has been lost, so in some cases it might not be obvious how to reconstruct them (e.g. "should this or that file be writable by the web server user or my own user?").
  • Complain to the provider and get them to redo the copy, doing it properly this time.
  • Thank you very much. (*sigh) apparently the host ran vzmigrate -r procedures which they claim removes the original container to avoid duplicate containers. So no easy rollback (they clearly should have had SOME sort of back-out plan in place). I'm proceeding with option 2 at this point.
    – Mike B
    Mar 21 '15 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.