Comment 6 for bug 1914062

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

There is here a change in behavior in lxc/lxd. Running https://paste.ubuntu.com/p/vz7SXcX3K9/:

On hirsute lxd container:

root@hirsute:~# ./test
access errno 13
path is read only: 0
root@hirsute:~# mount | grep 'sysfs on /sys '
sysfs on /sys type sysfs (rw,relatime)

On focal lxd container:

root@focal:~# ./test
path is read only: 1
root@focal:~# mount | grep 'sysfs on /sys '
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)

(no idea why there are two mounts in focal)

According to https://systemd.io/CONTAINER_INTERFACE/ , /sys should be mounted read-only?