sysrepo: Ubuntu 20.04 LTS permission denied error

On Ubuntu 20.04, there is an error with yet unknown cause tracked in cesnet/netopeer2#621. In sysrepo it manifests in permission denied errors on most operations even when using the root user. The only solution we can suggest right now is not to use this distribution.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 19 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Isn’t setting ‘sysctl fs.protected_regular=0’ an acceptable workaround for now in 20.04?

or to persist through reboots, something like this

echo “fs.protected_regular = 0” > /etc/sysctl.d/60-disable-fs-protected-regular

This is not a Ubuntu-specific issue. It’s caused by recent enough kernel (4.19+) and systemd (>= 241). The /dev/shm directory has the sticky bit set, this kernel patch added support for the fs.protected_regular sysctl knob, and this knob in turn gets enabled via systemd. As a result, one cannot use O_CREAT on “somebody else’s files” on those world-writable sticky directories.

I’ll follow up on a random kernel mailing list to find out if this is the expected behavior here (my personal opinion is “WTF?”).