lxc list run via sudo creates root-owned files in the user's home directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
LXD description:
1. Fresh 18.04 server
2. Run "sudo lxc list"
3. Note new root owned ~/.config directory.
This does not occur on Eoan including with snap version of 3.0.4.
Previous description:
On a fresh Ubuntu 18.04 server installation, running sosreport creates root-owned files in ~/.config. Specifically, I'm using the following command:
sudo sosreport --batch --tmp-dir /tmp/
Prior to running this command, ~/.config did not exist. After running the command, ~/.config exists and is owned by root, with a lxd subdirectory:
$ sudo ls -lR .config
.config:
total 4
drwxr-x--- 2 root root 4096 Sep 19 12:16 lxc
.config/lxc:
total 8
-rw-r--r-- 1 root root 188 Sep 19 12:16 config.yml
-rw------- 1 root root 5 Sep 19 12:16 cookies
This root ownership of ~/.config and ~/.config/lxd causes problems for subsequent programs run without sudo.
$ apt-cache policy sosreport
sosreport:
Installed: 3.6-1ubuntu0.
Candidate: 3.6-1ubuntu0.
Version table:
*** 3.6-1ubuntu0.
500 http://
100 /var/lib/
3.5-1ubuntu3 500
500 http://
I've reported this bug upstream:
Reassigning to LXD, as it's reproducible with a simple
sudo lxc list.