-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read-only config file(s) #975
Comments
The comment above describes why it needs RW permissions. Are you asking us to look into alternative manners of handling this so it only needs read permissions, or are you looking for suggestions on how you can handle this differently? I'm also pretty sure ZNC writes to the config every time a change is made (i.e. new user created, network added), so it definitely needs write permission. |
Either one would be fine by me, honestly. If there's a workaround that's available in the current version of ZNC I'd love to know about it. Off the top of my head, I imagine you could create a
This is true, but my plan is to not rely on this live-updating, instead I'd like to update my provisioning script (adding the user/network/module/whatever centrally), deploy the new config file and then |
I don't know if ZNC has improved it over the years, but ZNC REHASH is supposedly very, very poorly written (and very unstable) and needs drastic improving. |
No. It's to prevent 2 ZNC processes to run together with the same config.
If you really want to manage config file by something else, restarting ZNC would be better than rehashing.
Not quite. It does that if changes are made through webadmin. Also config is saved if user joins/part a channel when chansaver is loaded. Adding a network through |
Btw, znc.conf is only part of config. Modules store their settings in different places. |
A separate lock file would still work to prevent this, then. Though if you were to theoretically change from a file lock to a lock file in a future version, that would make two differing versions of ZNC running on the same config possible. I wasn't aware that rehash is being deprecated, I'll keep that in mind. I don't currently have a problem with module config files, as they're being opened as read-only (at least |
I'm also trying to automate ZNC deployment with a configuration management tool, and would love to see a way to have ZNC not write its config file (and possibly keep users and networks in a different file than listeners and global config) |
I'd like to make my config files read-only. I use a provisioning tool to manage my servers, including ZNC configuration, and would ideally like to prevent a running ZNC process from making any changes to the files.
I thought I could achieve this by making the files read-only (
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/22017607-read-only-config-file-s?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).chmod 400
), but apparently ZNC opens znc.conf in read+write mode even when only reading+parsing the file, so that's not a possibility.The text was updated successfully, but these errors were encountered: