> For the complete documentation index, see [llms.txt](https://strangebutohwell.gitbook.io/knowledge/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://strangebutohwell.gitbook.io/knowledge/linux/administration/sudo/bug-setrlimit-rlimit_core-error.md).

# BUG: setrlimit(RLIMIT\_CORE) Error

## Description

In Ubuntu 20.04 containers (i.e.: LXC, Docker), issuing a `sudo` command results in the following error:&#x20;

```
setrlimit(RLIMIT_CORE): Operation not permitted
```

### Cause:&#x20;

Handling of RLIMIT\_CORE appears to be buggy in Linux containers. When sudo tries to restore the original coredump limit (which appears to be RLIM\_INFINITY) as uid 0 it gets EPERM, which should not happen. Sudo 1.8.28 just silently ignored the failure, in 1.8.29 and above a warning is written to the standard error.

## Fix

A fix was implemented in sudo version sudo **1.8.31p1** and above, but a workaround exists if you can not update yet:

```
echo "Set disable_coredump false" >> /etc/sudo.conf
```

## Reference

{% embed url="<https://github.com/sudo-project/sudo/issues/42>" %}
