2

Having an issue with a new lxc container. I've only just started playing with lxd/lxc and it's setup as default. I'm using lxc version 2.0.4 and the host is Ubuntu 14.04.5 LTS

I've created a new container with:

$ lxc launch ubuntu:16.04 dnsfilter

when I enter the container (lxc exec dnsfilter bash) I'm able to create files, but not chown them at all.

root@dnsfilter:~# touch file1
root@dnsfilter:~# chown nobody file1
chown: changing ownership of 'file1': Operation not permitted

root@dnsfilter:~# ls -laF
total 10
drwx------  2 root root    6 Oct 19 09:40 ./
drwxr-xr-x 22 root root   22 Oct 18 07:18 ../
-rw-------  1 root root  842 Oct 18 12:10 .bash_history
-rw-r--r--  1 root root 3106 Oct 22  2015 .bashrc
-rw-r--r--  1 root root  148 Aug 17  2015 .profile
-rw-r--r--  1 root root    0 Oct 19 09:39 file1

This interferes with a heap of things, like apt-get install anything-at-all

Anyone got any ideas?

3
  • What does grep nobody /etc/passwd show?
    – Tigger
    Commented Oct 19, 2016 at 10:31
  • lsattr file1 too.
    – user192526
    Commented Oct 19, 2016 at 11:02
  • 1
    nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin and # lsattr file1 lsattr: Function not implemented While reading flags on file1
    – Andrew
    Commented Oct 19, 2016 at 12:01

0

You must log in to answer this question.

Browse other questions tagged .