# Cant disable read-only mode

**URL:** https://meta.discourse.org/t/cant-disable-read-only-mode/72242
**Category:** Support
**Tags:** read-only
**Created:** [10월 17, 2017, 4:50오전 UTC](https://meta.discourse.org/t/cant-disable-read-only-mode/72242 "2017-10-17T04:50:35Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![dje4321](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dje4321/32/78454_2.png) [@dje4321](https://meta.discourse.org/u/dje4321)
#### Post date: [10월 17, 2017, 4:50오전 UTC](https://meta.discourse.org/t/cant-disable-read-only-mode/72242/1 "2017-10-17T04:50:35Z")

</div>

I enabled read-only mode on my forums and im not able to disable it.

I cant disable read-only mode via the /admin/backups because i cant login.

* * *

entering the docker image and disabling it via rails does not work either.

```plaintext
rails c
Discourse.disable_readonly_mode

```

* * *

entering the docker image and running

```plaintext
discourse disable_readonly

```

does not work either.

* * *

Anything im missing?

sorry if the bug category is not the correct category. I think this might be a bug

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [10월 17, 2017, 5:40오전 UTC](https://meta.discourse.org/t/cant-disable-read-only-mode/72242/2 "2017-10-17T05:40:18Z")

</div>

It depends on how you trigger readonly mode.

> <https://github.com/discourse/discourse/blob/main/lib/discourse.rb#L291-L295>

There is a list of keys that you can pass to Postgres depending on how you trigger it

> <https://github.com/discourse/discourse/blob/main/lib/discourse.rb#L256-L259>

---

<div class="post-metadata">

### Author: ![dje4321](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dje4321/32/78454_2.png) [@dje4321](https://meta.discourse.org/u/dje4321)
#### Post date: [10월 17, 2017, 11:52오전 UTC](https://meta.discourse.org/t/cant-disable-read-only-mode/72242/3 "2017-10-17T11:52:13Z")

</div>

Thanks

This command in rails did the trick

`Discourse.disable_readonly_mode(Discourse::USER_READONLY_MODE_KEY)`

---

<div class="post-metadata">

### Author: ![Thomas\_Rother](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thomas_rother/32/423597_2.png) [@Thomas\_Rother](https://meta.discourse.org/u/Thomas_Rother)
#### Post date: [11월 27, 2023, 9:38오전 UTC](https://meta.discourse.org/t/cant-disable-read-only-mode/72242/5 "2023-11-27T09:38:32Z")

</div>

최신 discourse 버전에서도 동일한 문제가 발생합니다.

1. web\_only 컨테이너 내부에서

```plaintext
root@forum:/var/www/discourse# discourse disable_readonly
The site is now fully operable.
root@forum:/var/www/discourse#

```

1. ./launcher enter web\_only

2. 그 후에도 메인 페이지에 “읽기 전용” 배너가 여전히 표시됩니다.

즉, 문제는 아직 해결되지 않았습니다 …

---

<div class="post-metadata">

### Author: ![Thomas\_Rother](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thomas_rother/32/423597_2.png) [@Thomas\_Rother](https://meta.discourse.org/u/Thomas_Rother)
#### Post date: [11월 27, 2023, 9:46오전 UTC](https://meta.discourse.org/t/cant-disable-read-only-mode/72242/6 "2023-11-27T09:46:50Z")

</div>

> [@dje4321](#):
>
> `Discourse.disable_readonly_mode(Discourse::USER_READONLY_MODE_KEY)`

… 네, 이제 rails c 커맨드라인 정보를 이용해 이 문제를 해결할 수 있게 되었습니다.  
하지만 어쨌든 이 부분은 개선되어야 합니다. 예를 들어, 읽기 전용 모드에서도 UX를 통해 관리자 작업을 수행할 수 있도록 토큰이 포함된 특수한 로그인 URL을 제공하는 방안이 있을 수 있습니다.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [6월 8, 2024, 12:36오후 UTC](https://meta.discourse.org/t/cant-disable-read-only-mode/72242/7 "2024-06-08T12:36:41Z")

</div>

이 주제는 2426일 후 자동으로 닫혔습니다. 더 이상 새 답글을 작성할 수 없습니다.
