[lxc-users] Ownership changes after container move

Serge Hallyn serge.hallyn at ubuntu.com
Tue Nov 10 15:30:03 UTC 2015


Quoting Tycho Andersen (tycho.andersen at canonical.com):
> Hi Jamie,
> 
> On Tue, Nov 10, 2015 at 09:10:22AM +0000, Jamie Brown wrote:
> > Hi,
> > 
> > I’ve discovered that some file ownership changes have occurred after moving stopped containers between hosts.
> > 
> > Prior to the move there were various user directories (e.g. “/home/jamie”) with ownership set to jamie:jamie. After moving, the ownership was changed to ubuntu:ubuntu.
> 
> Sounds like a pretty serious bug. Do you happen to know how to
> reproduce the problem?

Can you, from the hosts, do a ls -ln on one of the offending
directories and show the results?  Seems there are 3 possiblities,

1. the files are simply chowned to wrong uid altogether
2. the files are chowned to the username rather than uid, and jamie's
   user/group is different between hosts.  That's a bug in lxd, it
   should use the numeric values.  (Probably a missing tar flag)
3. the files are chowned (correctly) to the original uid, but
   the way you're looking at the files uses a different /etc/{passwd,group}
   so the names appear different.


More information about the lxc-users mailing list