Почему я могу редактировать /etc/resolv.conf в файловой системе только для чтения?

Эта проблема для вышестоящего проекта systemd, по-видимому, указывает на то, что то, что вы пытаетесь сделать, невозможно, и они не собираются добавлять это, в основном из-за ограничений работы ядра.

отрывок

please note that bind mounts after they have been made are entirely independent entry points to the same file system than the original mount used to create them. This means, after creating /opt/oh as bind mounts the fact that /mnt/sda is on an automount point is entirely irrelevant for its lifecycle: the new bind mounts point directly to the effective file system, they lose any automount magic. And that's a kernel design choice and is nothing systemd can do anything about it.

Sorry, but systemd can't do what you want to do, because the kernel simply doesn't work that way!

sorry!

В любом случае у вас остаются альтернативные методы, один из которых описан в этом разделе вопросов и ответов U&L под названием:Привязка USB-накопителя к домашнему каталогу по запросу .

0
17.08.2020, 22:39
1 ответ

However, I see that I am still able to change the contents of file /etc/resolv.conf How is that possible?

Это либо символическая ссылка на смонтированную файловую систему tmpfs, например. в /runили /varили вы работаете с виртуальной файловой системой COW , такой как UnionFS/aufs/overlayfs/etc.

3
18.03.2021, 23:11

Теги

Похожие вопросы