---
layout: article
title: Database permissions
description: Control access to your DocumentsDB data with permissions. Learn how to set collection level and document level access rules.
---

Permissions define who can access documents in a collection. By default **no permissions** are granted to any users, so no user can access any documents.
Permissions exist at two levels, collection level and document level permissions.

In Appwrite, permissions are **granted**, meaning a user has no access by default and receives access when granted.
A user with access granted at either collection level or document level will be able to access a document.
Users **don't need access at both levels** to access documents.

# Collection level
Collection level permissions apply to every document in the collection.
If a user has read, create, update, or delete permissions at the collection level, the user can access **all documents** inside the collection.

Configure collection level permissions by navigating to **Your collection** > **Security** > **Permissions**.

![Collection permissions in the Security tab](/images/docs/databases/documentsdb/security-permissions.avif)

[Learn more about permissions and roles](/docs/advanced/platform/permissions)

# Document level
Document level permissions grant access to individual documents.
If a user has read, create, update, or delete permissions at the document level, the user can access the **individual document**.

Document level permissions are only applied if document level security is enabled in the security settings of your collection.
Enable document level permissions by navigating to **Your collection** > **Security** > **Document level security**.

![Document level security toggle in the Security tab](/images/docs/databases/documentsdb/security-rls.avif)

Document level permissions are configured on individual documents.

[Learn more about permissions and roles](/docs/advanced/platform/permissions)

# Common use cases

For examples of how to implement common permission patterns, including creating private documents that are only accessible to their creators, see the [permissions examples](/docs/advanced/platform/permissions#examples) in our platform documentation.
