7 ms·
> in a /etc/config file that is silently changed by services? I'm not really invested in the Windows vs Linux thing but config files in /etc never get silently
by ayushnix 5y ago
> in a /etc/config file that is silently changed by services?
I'm not really invested in the Windows vs Linux thing but config files in /etc never get silently changed or removed. If they are, it's a critical bug, although I've never really seen it happen.
If there are any updates to the service files, they'll be installed alongside the original file. For example, on Arch Linux, it'll be /etc/systemd/journald.conf.pacnew while the original journald.conf file will never be touched.
- aidenn0 5y agoDebian based systems will change some config files on updates; I had a systemd customization that was overwritten out from under me, and I evntually found there was one place for apt to manage and a different for me to manage.
- ayushnix 5y ago> Debian based systems will change some config files on updates; I had a systemd customization that was overwritten out from under me, and I evntually found there was one place for apt to manage and a different for me to manage. The only place where a package manager should overwrite changes is /usr. If you made any changes inside /usr, then yes, it'll be overwritten. A user isn't supposed to mess around inside /usr, unless there's a very good reason for it. There's /usr/local but it's better to just use $HOME/.local instead.
- aidenn0 5y agoIt's entirely possible it wasn't in /etc but somewhere else. This was a case of "I need to fix this urgently" and the first workaround I could find on stackoverflow suggested changing it in one place. After the problem came up again after an update I did a bit more digging to figure out where I could change it and apt would not overwrite it.
- oauea 5y agoapt will tell you the file was changed and ask you what to do (keep current, use new, show diff & merge). so you must've chosen to replace it, or used some gui updater that made the choice for you.
- floren 5y agoYou mean the scary prompts that I just mash "Y" on??? (can you tell that I've shipped Debian packages before?)
- goodpoint 5y agoNo, Debian always asks before overwriting anything in /etc and provides convenient options like showing a diff during the process.
- iso1210 5y agoOnly if you've changed from the default config file, and it's not anything in /etc, it's anything specified in the conffiles file in the .deb, which I believe should include things in /etc according to policy, but can include others (and doesn't have to include things in /etc if you ignore policy) And of course you can do anything you want in a postinst script (again setting aside policy)
- goodpoint 5y ago"setting aside policy" any software can do rm -rf / The whole point of Linux distributions is having policies to protect the end user and enforcing them.
- jart 5y agoHow long have you been using Linux? You've never had something like NetworkManager undo your edits to /etc/resolv.conf within microseconds? Control over DNS is like the hunger games of systems engineering. SystemD has probably taken over all the juicy stuff in /etc by now so I doubt newcomers would notice these days.
- ayushnix 5y ago> You've never had something like NetworkManager undo your edits to /etc/resolv.conf within microseconds? I've never really used NetworkManager on my personal setup but if you're using it, you are willingly giving control of your network settings inside /etc to it, including the DNS, which is why /etc/resolv.conf gets changed automatically. You can choose not to use NetworkManager or systemd-resolvd (while still using systemd) and they won't mess around with /etc/resolv.conf. For network management, I do use systemd-networkd and it hasn't overwritten or changed my files in /etc/systemd/network in the past 6 years of me using Linux, not that I recall at least.
- jart 5y agoMy will is to control my dns but unfortunately every software vendor wants to control it and leak it and intercept it too. Not much choice there. You should ask yourself what you're not seeing.
- ayushnix 5y agoIf it helps, I've installed AdGuard Home on a Raspberry Pi 4 and I've configured my router to make my devices use the RPi for DNS queries. This would ensure devices with DNS management services (Android) use the DNS I want. For devices that don't use DNS management services, I've changed /etc/resolv.conf manually to point it to my RPi and that file never gets modified automatically. It's upto you how you manage your settings in /etc. A software will never modify anything in /etc without your choice.
- jart 5y ago