让我稍微解释一下我正在尝试做的事情,我试图通过非 root 用户管理网络管理器文件,但我不断收到以下错误消息:
keyfile: updating /etc/NetworkManagere/system-connections/zzssid
keyfile: error: File Permissions (100660) or owner (1000) were insecure
然后机器将无法连接到 wifi,但如果 root 用户创建该文件并将其放在系统连接文件夹中,则 wifi 就会立即工作。
任何关于此的建议或反馈都将受到感谢。
答案1
从man NetworkManager.conf
:
keyfile
plugin is the generic plugin that supports all
the connection types and capabilities that NetworkManager has.
It writes files out in a .ini-style format in
/etc/NetworkManager/system-connections. For security, it will
ignore files that are readable or writeable by any user or
group other than root since private keys and passphrases may be stored
in plaintext inside the file.
在您的例子中,文件的所有者/etc/NetworkManagere/system-connections/zzssid
是具有 UID 的用户1000
,并且权限设置为660
,因此不出所料它不起作用。您需要将所有者和组设置为root
仅root
具有读写权限。以下是一个例子:
$ ls -l /etc/NetworkManager/system-connections/
-rw------- 1 root root 324 Feb 18 20:36 Test-WiFi
-rw------- 1 root root 315 Apr 11 01:14 FooBar-WiFi