4 ms·
If you're lazy, never do this. It's not very visible and you or someone else will lose hours troubleshooting it later.
by noja 6y ago
If you're lazy, never do this. It's not very visible and you or someone else will lose hours troubleshooting it later.
- vsareto 6y agoAdd a comment in the file?
- bawolff 6y agoIsn't that the quintessential lazy programmer solution? A quick hack that is beautiful but will cause lots of wasted time later.
- ubercow13 6y agoTroubleshooting what?
- gpvos 6y agoMaybe someone later has some legitimate edit they want to make to the file, which fails because it's immutable, which is in turn very hard to figure out. (E.g., I didn't know that there exists an "immutable" attribute.)
- protomyth 6y agoPut a comment in the file with the exact commands to turn on and off immutability. This is just good practice for most things. Having a maintenance text file with all the system stuff is a secondary good practice along with the comment.
- viraptor 6y agoFor example why some daemon in the future takes lots of CPU spinning and logging errors about not being able to write to a file it's configured to manage.
- Avamander 6y agoI'll be grateful that it let me know it's stupid and can't fail gracefully.
- ubercow13 6y agoSound like exactly the kind of badly designed daemon I'd be trying to protect against by making the change in the first place
- viraptor 6y agoLet's be honest: Next to no service is designed to expect immutable files. At best they're handling a situation of read-only filesystems. If they document how configure not writing to a file and instead of doing that, the user is marking the file immutable, I wouldn't blame the app design.
- rascul 6y agoSometimes there's a point when you're just fed up with crap messing with your config and spending time hunting it down every other week to fix it and you just want it to stop.
- Hello71 6y agoso you'd rather spend time hunting down which config file you've mangled to be incompatible every month? this is not a good solution.
- rascul 6y agoI can think of no other cases where so many different tools write to the same single configuration file. Also I'm not necessarily saying it's a good or a bad solution. But it works, so there's that.
- peterwwillis 6y agoI'm lazy, and I've been doing this on my own computers for over a decade. I wouldn't do it on a box that anyone else uses. And I've had to do the normal fixes for some VPN software when the network blackholes any DNS traffic not going to their server IPs. Otherwise it's worked out fine for me
- dvfjsdhgfv 6y agoHours? If you have problems modifying a file as root on a writable medium, checking for immutability is probably the first thing to do.
- superkuh 6y agoIf you do it on every new system after OS install it's hard to forget.
- jrnichols 6y agoThat's why you leave yourself a comment reminding yourself what angry you did last week. :)