Hey!

Looked into this, and related to nosuid we did not observe any
difference in behaviour across Ubuntu Core 22, 24 and 26. They are all
mounting the ubuntu-data partition (and in turn, the writable data) as
nosuid.

What we did observe in relations to making suid binaries work for LXD is
that there is a difference between running `lxd init` where zfs is by
default suggested as a storage backend, and running `lxd init --auto`
where the storage backend is `dir`.

The issue with the storage backend `dir` is that it uses the ubuntu-data
filesystem as storage, which does not allow suid binaries. If you use an
image format that requires a loop device, like `zfs`, it works around
this and works fine by our testing.

This is from running LXD using zfs as a storage pool:

```
ubuntu@assured-shrew:~$ sudo ls /
bin                boot  etc   lib                lib64  mnt  proc  run   
sbin.usr-is-merged  srv  tmp  var
bin.usr-is-merged  dev   home  lib.usr-is-merged  media  opt  root  sbin  snap  
              sys  usr
```

This is from running LXD using dir as a storage pool:
```
ubuntu@grateful-griffon:~$ sudo ls /
sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 
'nosuid' option set or an NFS file system without root privileges?
```

Lxd version is 5.21.6-78b046a and system used for the above results is
Ubuntu Core 24.

How was your storage initialized?

** Changed in: snapd
       Status: Confirmed => Incomplete

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

Title:
  New user in LXC instance (in LXD) cannot use sudo, even though an
  admin

To manage notifications about this bug go to:
https://bugs.launchpad.net/snapd/+bug/2161603/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to