# 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>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://strangebutohwell.gitbook.io/knowledge/linux/administration/sudo/bug-setrlimit-rlimit_core-error.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
