# Namespaces

{% hint style="info" %}
Required for Sandboxing, Security & Performance
{% endhint %}

Some portable packages use user namespaces for sandboxing, which may be restricted on certain systems.

## Common Errors

```
clone failed: Operation not permitted
```

```
user namespaces are not enabled
```

## Solutions

### Enable User Namespaces

**Check current setting:**

```bash
sysctl kernel.unprivileged_userns_clone
```

**Enable temporarily:**

```bash
sudo sysctl -w kernel.unprivileged_userns_clone=1
```

**Enable permanently:**

```bash
echo 'kernel.unprivileged_userns_clone=1' | sudo tee /etc/sysctl.d/userns.conf
sudo sysctl --system
```

### Debian/Ubuntu Specific

```bash
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
```

### Use --no-sandbox

Some applications accept `--no-sandbox` flag (use with caution).


---

# 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://docs.pkgforge.dev/formats/packages/errors-and-quirks/namespaces.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.
