I want to edit a service file located in /usr/lib/systemd/system. Even if I edit it as root (sudo), it says Can't open file for writing.
I thought it's a permission problem, but when trying to add rights to the file I get: chmod: changing permissions of 'flannel-docker-opts.service': Read-only file system.
Since that isn't media(USB or something), I don't think I should mount it?
I'm on coreOS btw.
This problem was more specific to Container Linux (specifically coreOS).
There are two methods of overriding default container Linux settings:
I've used the latter.
I was configuring a file flannel-docker-opts.service located in the system direcotry. I solved it using a system drop-in. First step was creating a directory flannel-docker-opts.service.d in /etc/systemd/system. I created a configuration file in that directory, with my changes.
More info in the official coreOS documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With