Read-only config mode #7711

Closed
opened 2025-11-02 07:34:20 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @clarfonthey on GitHub (Aug 19, 2021).

Description

Right now, gitea will always attempt to open app.ini and other config files (like INTERNAL_TOKEN_URI) in read-write mode. This causes the process to fail when these files are marked as read-only.

It seems desirable to be able to open these files when they are not writable by gitea, falling back to errors when they would otherwise need to be written.

Side note, I've been experimenting with watching for config changes for various services I use, and auto-restarting the services when they change. For gitea this is infeasible due to it opening all its files as writeable, since it will get caught in a restart-loop.

Originally created by @clarfonthey on GitHub (Aug 19, 2021). ## Description Right now, gitea will always attempt to open app.ini and other config files (like `INTERNAL_TOKEN_URI`) in read-write mode. This causes the process to fail when these files are marked as read-only. It seems desirable to be able to open these files when they are not writable by gitea, falling back to errors when they would otherwise need to be written. Side note, I've been experimenting with watching for config changes for various services I use, and auto-restarting the services when they change. For gitea this is infeasible due to it opening all its files as writeable, since it will get caught in a restart-loop.
GiteaMirror added the type/proposaltopic/security labels 2025-11-02 07:34:20 -06:00
Author
Owner

@lunny commented on GitHub (Aug 19, 2021):

I think maybe it should be related with INSTALL_LOCK. If it's true, then it could be read-only. Otherwise, Gitea could change it.

@lunny commented on GitHub (Aug 19, 2021): I think maybe it should be related with `INSTALL_LOCK`. If it's true, then it could be read-only. Otherwise, Gitea could change it.
Author
Owner

@noerw commented on GitHub (Aug 23, 2021):

see also #7263

@noerw commented on GitHub (Aug 23, 2021): see also #7263
Author
Owner

@wxiaoguang commented on GitHub (Apr 16, 2022):

Dup with

@wxiaoguang commented on GitHub (Apr 16, 2022): Dup with * https://github.com/go-gitea/gitea/issues/7263
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7711