Score:0

Need help with a Netplan configuration issue

sj flag

When I did sudo netplan apply, it shows me permission warnings. Below are the same exact messages shown by the terminal.

** (generate:2496): WARNING **: 05:24:24.943: Permissions for /etc/netplan/00-installer-config.yaml are too open. Netplan configuration should NOT be accessible by others.

** (generate:2496): WARNING **: 05:24:24.943: Permissions for /etc/netplan/01-network-manager-all.yaml are too open. Netplan configuration should NOT be accessible by others.
Cannot call openvswitch: ovsdb-server.service is not running.

** (process:2494): WARNING **: 05:24:25.215: Permissions for /etc/netplan/00-installer-config.yaml are too open. Netplan configuration should NOT be accessible by others.

** (process:2494): WARNING **: 05:24:25.215: Permissions for /etc/netplan/01-network-manager-all.yaml are too open. Netplan configuration should NOT be accessible by others.

** (process:2494): WARNING **: 05:24:25.296: Permissions for /etc/netplan/00-installer-config.yaml are too open. Netplan configuration should NOT be accessible by others.

** (process:2494): WARNING **: 05:24:25.296: Permissions for /etc/netplan/01-network-manager-all.yaml are too open. Netplan configuration should NOT be accessible by others.

** (process:2494): WARNING **: 05:24:25.296: Permissions for /etc/netplan/00-installer-config.yaml are too open. Netplan configuration should NOT be accessible by others.

** (process:2494): WARNING **: 05:24:25.296: Permissions for /etc/netplan/01-network-manager-all.yaml are too open. Netplan configuration should NOT be accessible by others.

stat /etc/netplan/00-installer-config.yaml:

  File: /etc/netplan/00-installer-config.yaml
  Size: 117         Blocks: 8          IO Block: 4096   regular file
Device: 253,0   Inode: 787924      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2023-07-10 00:36:05.082334425 +0000
Modify: 2023-06-12 09:56:02.404864248 +0000
Change: 2023-06-12 09:56:02.404864248 +0000
 Birth: 2023-06-12 09:56:02.404864248 +0000

A clearer version for the stat netplan command: https://www.coderstool.com/cs/Yf7XHb

cat /etc/netplan/00-installer-config.yaml:

network:
  ethernets:
    enp0s1:
      dhcp4: true
  version: 2

Clearer snippet: https://www.coderstool.com/cs/3HwyVa

I have continued with "sudo systemctl start isc-dhcp-server" , "sudo systemctl enable isc-dhcp-server", then "sudo systemctl status isc-dhcp-server". Below are the results of the commands.

Command snippet: https://www.coderstool.com/cs/bF69W4

babayaga avatar
sj flag
stat /etc/netplan/00-installer-config.yaml File: /etc/netplan/00-installer-config.yaml Size: 117 Blocks: 8 IO Block: 4096 regular file Device: 253,0 Inode: 787924 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2023-07-10 00:36:05.082334425 +0000 Modify: 2023-06-12 09:56:02.404864248 +0000 Change: 2023-06-12 09:56:02.404864248 +0000 Birth: 2023-06-12 09:56:02.404864248 +0000
Artur Meinild avatar
vn flag
That's strange - permissions look correct compared to my system.
babayaga avatar
sj flag
I have attached the Stat netplan command results. I'm so lost right now. I can't seem to configure it... T.T
Artur Meinild avatar
vn flag
What's not working? You know it's only a warning, right - it's not an error..
babayaga avatar
sj flag
The status of my dhcp server has failed once I have done with configuring the netplan configurations. I have updated my question. Feel free to have a look. Also, thanks a lot for your replies!
cn flag
the DHCP servers may be unrelated. What happens when you start it manually? I *suspect* that the order the services are started in are 'wrong' - but I just ended up going back to the classic /etc/networks setup before I got around to digging further
cn flag
Also "Cannot call openvswitch: ovsdb-server.service" is not running. seems worth focusing on
Marco avatar
br flag
Try `sudo chmod -R o-rwx /etc/netplan/`, which removes access of "others". Can it be that this is Ubuntu in a virtual environment or similar ?
uz flag
Jos
I have the same permissions on my `01-network-manager-all.yaml` and when I do `sudo netplan apply`, it gives me the same warning (four times). Nevertheless, the network works fine.
Score:0
kr flag

chmod 600 /etc/netplan/your_config_file.yaml should solve your problem. Do this for every netplan file that was listed in the warnings.

babayaga avatar
sj flag
It says operation not permitted. How do I get around this?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.