Skip to content

Fix Portainer User/Team – Permission Denied on Resources

DodaTech Updated 2026-06-24 3 min read

In this tutorial, you'll learn about Fix Portainer User/Team. We cover key concepts, practical examples, and best practices.

You create a user in Portainer, assign them to a team, and they log in — but the Dashboard shows no environments. Or they can see the environment but can't deploy a stack. The UI shows greyed‑out buttons or "Access denied" messages.

Wrong ❌

User: alice
Team: Dev Team
Environment: Dev Server (no access explicitly given)

Alice logs in and sees:

📁 Dashboard
  No environments available

She should see the **Dev Server** environment. The Portainer admin created the user and team but forgot to grant environment access.

## Right ✅

**Grant environment access:**

1. **Settings → Users** → click user `alice` (or **Teams** → team `Dev Team`)
2. **Environments** tab
3. Tick the environment (e.g. `Dev Server`)
4. Set **Role:** `Operator` (can manage containers and stacks) or `Viewer` (read‑only)

**Team‑based access (recommended):**

1. **Settings → Teams → Dev Team**
2. **Environments** → tick `Dev Server`
3. **Role:** `Operator`

Now Alice logs in and sees:

📁 Dashboard
  📁 Dev Server
    Containers: 4
    Images: 12
    Volumes: 5

**Role comparison:**

| Role | View | Deploy | Manage Users |
|------|------|--------|-------------|
| Administrator | All | Yes | Yes |
| Operator | Assigned | Yes | No |
| Viewer | Assigned | No | No |

**Restrict stack access within an environment:**

Portainer's **Resource controls** allow per‑stack or per‑container permissions:

1. Open a stack → **Access control**
2. Remove the `Administrators` default
3. Add `Dev Team` as `Operator`

Now only Dev Team members can modify that specific stack.

## Root Cause

Portainer uses Role‑Based Access Control (RBAC). New users have no environment access by default — it must be explicitly granted per environment or via a team. Without this, the dashboard appears empty.

## Prevention

- Use **Teams** for group‑level access — much easier than managing users individually.
- Follow the principle of least privilege: start with `Viewer`, upgrade to `Operator` only when needed.
- Audit access quarterly: **Settings → Teams** → review each team's environments.
- Use **Resource controls** for multi‑tenant environments where different teams share a cluster.


## Common Mistakes with user team

1. **Forgetting that lazy evaluation defers computation until the value is forced, causing space leaks with unevaluated thunks**
2. **Using `return` to exit a function early instead of wrapping a pure value in the monad**
3. **Mixing let bindings with <- bindings in do notation, producing type errors**

These mistakes appear frequently in real-world PORTAINER code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.

## Practice Exercise

**Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.**

This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.

## FAQ

<details style="margin-bottom:12px;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden"><summary style="cursor:pointer;padding:14px 18px;font-weight:600;font-size:1.05rem;background:#f8fafc;border-bottom:1px solid #e2e8f0;color:#1e293b">**Q: Can a user belong to multiple teams?**</summary><div style="padding:14px 18px;color:#475569;line-height:1.7;background:#fff"><p>A: Yes — a user can be in multiple teams. They inherit the union of all team environment permissions.</p>
</div></details><details style="margin-bottom:12px;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden"><summary style="cursor:pointer;padding:14px 18px;font-weight:600;font-size:1.05rem;background:#f8fafc;border-bottom:1px solid #e2e8f0;color:#1e293b">**Q: Why does an Operator see "Access denied" when trying to delete a stack?**</summary><div style="padding:14px 18px;color:#475569;line-height:1.7;background:#fff"><p>A: The stack may have a <strong>Resource control</strong> limiting deletion to Administrators. Check the stack's access control settings.</p>
</div></details><details style="margin-bottom:12px;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden"><summary style="cursor:pointer;padding:14px 18px;font-weight:600;font-size:1.05rem;background:#f8fafc;border-bottom:1px solid #e2e8f0;color:#1e293b">**Q: What happens when I remove a user from a team?**</summary><div style="padding:14px 18px;color:#475569;line-height:1.7;background:#fff"><p>A: They immediately lose the team's environment permissions. Their other teams' permissions remain.</p>
</div></details><details style="margin-bottom:12px;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden"><summary style="cursor:pointer;padding:14px 18px;font-weight:600;font-size:1.05rem;background:#f8fafc;border-bottom:1px solid #e2e8f0;color:#1e293b">**Q: Is there an audit log of user actions?**</summary><div style="padding:14px 18px;color:#475569;line-height:1.7;background:#fff"><p>A: Portainer CE has basic activity logs. Portainer Business includes a full audit trail.</p>
</div></details>

---

*User management is covered in the [DodaTech Portainer Administration course](https://dodatech.com/courses/portainer).*

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro