Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

images/ubuntu: Fix permission for netplan config #748

Merged
merged 1 commit into from Jun 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions images/ubuntu.yaml
Expand Up @@ -807,5 +807,11 @@ actions:
types:
- vm

- trigger: post-files
action: |-
#!/bin/sh
set -eux
[ -f /etc/netplan/10-lxc.yaml ] && chmod 0600 /etc/netplan/10-lxc.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we set the correct perms when its creates rather than later though?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot, the dump generator has a mode option. Let me fix that.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I'm having the same issue with netplan and used your code to set permissions. I'm still getting "Cannot call openvswitch: ovsdb-server.service is not running" . Am I doing something wrong here? are there any further steps needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lukasz0617 can you confirm that 10-lxc.yaml has the correct permission set in the container?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First time creating new instance for a few weeks and I am NOW also seeing

"Permissions for /etc/netplan/90-lxc.yaml are too open. Netplan configuration should NOT be accessible by others. WARNING:root:Cannot call Open vSwitch: ovsdb-server.service is not running"

with image 22.04 (unchanged apart from any automatic updating). Note that 90-lxc.yaml was a pushed file and the permissions were indeed too open - I simply chmod 0600 /etc/netplan/90-lxc.yaml - and then netplan try accepted the config without issue but still reported

"Cannot call openvswitch: ovsdb-server.service is not running"

The LXD set up has been in place for a while. Doesn't seem to create any issues, but clearly not right?

mappings:
architecture_map: debian