---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.0
alternate:
  - en/datalens/troubleshooting/errors/ERR-DS_API-DB-CH-READONLY_USER.md
  - en/troubleshooting/errors/ERR-DS_API-DB-CH-READONLY_USER
  - ru/troubleshooting/errors/ERR-DS_API-DB-CH-READONLY_USER
  - href: en/troubleshooting/errors/ERR-DS_API-DB-CH-READONLY_USER.md
    type: text/markdown
    title: Markdown version
csp:
  - script-src:
      - https://mc.yandex.ru
    img-src:
      - https://mc.yandex.ru
    connect-src:
      - https://mc.yandex.ru
      - wss://mc.yandex.ru
    child-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-ancestors:
      - 'blob:'
      - https://mc.yandex.ru
canonical: en/troubleshooting/errors/ERR-DS_API-DB-CH-READONLY_USER.html
title: 'DataLens On-premises error: ERR.DS_API.DB.CH.READONLY_USER'
description: >-
  This page describes the `ClickHouse® user must be correctly configured to use
  readonly 1 option (see docs)` DataLens On-premises error. For other readonly
  options user should have parameter readonly set to 0 or 2.
vcsPath: en/troubleshooting/errors/ERR-DS_API-DB-CH-READONLY_USER.md
---

# [DataLens On-premises] ClickHouse® user must be correctly configured to use readonly 1 option (see docs). For other readonly options user should have parameter readonly set to 0 or 2

`ERR.DS_API.DB.CH.READONLY_USER`

This error occurs because of restrictions in the ClickHouse® user profile or because the server-side `readonly` setting does not match the DataLens connection setting.

To fix this error:

* For data reads, set `Readonly` to `2` in [advanced connection settings](../../operations/connection/create-clickhouse.md#clickhouse-additional-settings).
* If `Readonly` is set to `1`, the ClickHouse® administrator should configure the user as described in [this guide](../../operations/connection/create-clickhouse.md).
* For data writes, use a user with proper permissions and set `Readonly` to `0` in advanced connection settings.
* In other cases, remove write operations.
