[lxc-users] Ownership changes after container move

Jamie Brown Jamie.Brown at mpec.co.uk
Tue Nov 10 11:39:23 UTC 2015


Apologies, I forget this is LXD and LXC mailing list!

I am using LXD;

# lxc stop test
# lxc move local:test remote:test

Thanks,

Jamie

From: lxc-users <lxc-users-bounces at lists.linuxcontainers.org<mailto:lxc-users-bounces at lists.linuxcontainers.org>> on behalf of Bostjan Skufca <bostjan at a2o.si<mailto:bostjan at a2o.si>>
Reply-To: LXC users mailing-list <lxc-users at lists.linuxcontainers.org<mailto:lxc-users at lists.linuxcontainers.org>>
Date: Tuesday, 10 November 2015 at 11:14
To: LXC users mailing-list <lxc-users at lists.linuxcontainers.org<mailto:lxc-users at lists.linuxcontainers.org>>
Subject: Re: [lxc-users] Ownership changes after container move

LXC/LXD? How did you move the containers? Did you use rsync without --numeric-ids maybe?

b.

From: lxc-users <lxc-users-bounces at lists.linuxcontainers.org<mailto:lxc-users-bounces at lists.linuxcontainers.org>> on behalf of Norberto Bensa <nbensa+lxcusers at gmail.com<mailto:nbensa+lxcusers at gmail.com>>
Reply-To: LXC users mailing-list <lxc-users at lists.linuxcontainers.org<mailto:lxc-users at lists.linuxcontainers.org>>
Date: Tuesday, 10 November 2015 at 11:16
To: LXC users mailing-list <lxc-users at lists.linuxcontainers.org<mailto:lxc-users at lists.linuxcontainers.org>>
Subject: Re: [lxc-users] Ownership changes after container move

Hi,

what prodecure did you use to move the container?

I usually use tar: cd /var/lib/lxc/ ; tar --numeric-owner -zcpf containter.tar container/, then, tar -zxpf container.tar in the target host.

HTH,
Norberto


2015-11-10 6:10 GMT-03:00 Jamie Brown <Jamie.Brown at mpec.co.uk<mailto:Jamie.Brown at mpec.co.uk>>:
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.

I discovered the issue when attempting to SSH to the moved host and was prompted to enter my password as I no longer owned my authorized_keys file.

I will try to repeat this, but I can confirm it has happened on multiple containers.

— Jamie

_______________________________________________
lxc-users mailing list
lxc-users at lists.linuxcontainers.org<mailto:lxc-users at lists.linuxcontainers.org>
http://lists.linuxcontainers.org/listinfo/lxc-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20151110/154fbd29/attachment.html>


More information about the lxc-users mailing list