A workaround may be used to temporarily fix the problem (following on
from the replication instructions above):

[LXD container]
## Install gdb
# apt install gdb -y

## Find docker pid
# cat /run/docker.pid
2624

## Attach gdb and set umask to 022
# gdb --pid 2624
... (attach process)
(gdb) call/o umask(022)
$1 = 0177
(gdb) quit
...
Quit anyway? (y or n) y
Detaching from program: /usr/bin/dockerd, process 2624

## Fix existing vfs images
# cd /var/lib/docker/vfs/dir
# chmod 755 *

## Run Ubuntu inside docker
# docker run -it ubuntu

[Docker container inside LXD container]
## Add a non-root test user
# adduser test
Adding user `test' ...
Adding new group `test' (1000) ...
Adding new user `test' (1000) with group `test' ...
Creating home directory `/home/test' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for test
Enter the new value, or press ENTER for the default
        Full Name []: Test user
        Room Number []:
        Work Phone []:
        Home Phone []:
        Other []:
Is the information correct? [Y/n] y

## Attempt to su to test user
# su - test
test:~$
(success)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1708445

Title:
  dockerd umask inside lxd container

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1708445/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to