I often have this problem in a freshly created Proxmox pct container running Ubuntu 20.04. When I run a command with sudo
I get this error.
$ sudo ls
sudo: setrlimit(RLIMIT_CORE): Operation not permitted
This workaround has always worked for me.
echo "Set disable_coredump false" >> /etc/sudo.conf