I can't seem to get builder to put the right user rights on network connections

I have a verdin imx8m-plus module running torizon6.6.1 build 14. for some reason, I can’t get builder to make the user rights be, -rw----------. even though I have the files themselves set that way, and the .tcattr file has:

file: NetworkManager/system-connections/network1.nmconnection

owner: 0

group: 0

user::rw-
group::—
other::—

file: NetworkManager/system-connections/network2.nmconnection

owner: 0

group: 0

user::rw-
group::—
other::—

it insists in making the group rights rw-
Is there any way to change this? If the rights have group in there, it seems to ignore the files and won’t do dhcp like it’'s supposed to. All I have to do is do a chmod g - rw of the files and reboot, and then it works.
Steve

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

For the issue you’re encountering with the builder not setting the correct user rights on network connections for your Verdin iMX8M Plus module running TorizonCore, it seems like there’s a discrepancy between the desired file permissions and what’s being applied during the build process.

Given the context, it appears that the build process or the environment itself might be overriding the permissions set in the .tcattr file. This can happen due to default behaviors or scripts that run during the build or initialization process, which might not respect the custom permissions defined.

To address this issue, you might consider adding a step in your build process or a script in your initialization process that explicitly sets the permissions on the network connection files to the desired state. This can be done by including a command similar to the one you manually run (chmod g-rw) in a script that runs at an appropriate point in your system’s startup sequence.

For example, you could add a custom script to your Yocto build that runs at startup, ensuring the permissions are set correctly before the network services start. This script could look something like this:

#!/bin/sh
chmod g-rw /etc/NetworkManager/system-connections/network1.nmconnection
chmod g-rw /etc/NetworkManager/system-connections/network2.nmconnection

Ensure this script is included in your image and set to execute on startup. You might need to place this script in a directory like /etc/rc.local or configure it as a systemd service, depending on your system’s initialization process.

This approach ensures that your desired permissions are enforced each time the system starts, circumventing the issue where the build process does not apply the permissions as specified in the .tcattr file.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Create a Single-Container Project | Toradex Developer Center.

Your suggestion worked, but I had to do a lot of things to get it going, as the /etc/rc.local is a file, not a directory, and the rc.local. service has to be enabled. Also the link provided is for UARTS, not bootup scripts.
Additionally, the script only needs to be run once, not every bootup.

Steve