Proper Way to Setup Netplan YAML File Permission

Let’s dive in and check how to fix these warnings !
According to the message, it means that we have given too much permission which can allow non-root user to get the file content.

By checking the official documentation (ref) , they suggest only given read-write to root user only, which comes with 600 for the command option of chmod .

Netplan’s configuration files use the YAML (v1.1) format. All files in /{lib,etc,run}/netplan/*.yaml are considered and are supposed to use restrictive file permissions (600 / rw-------), i.e. owner (root) read-write only.

Before

As the following console output, we found that the YAML files are along with permission 644 which give read operation for user, that’s the cause for the warnings.

Visit Now

Tags: Netplan YAML