wpa_supplicant - run without sudo

235 Views Asked by At

I'm developing an embedded linux application & it uses egt as the GUI front-end. The GUI uses wpa_supplicant to connect/ register WiFi network. I've got the same GUI application running on my desktop for development purposes.

Accessing wpa_supplicant (e.g. wpa_ctrl_open) isn't an issue on the actual embedded device as it runs as root, but on the desktop I'm running into permission errors. I don't want to run the GUI application as root on my desktop in case it trashes my system.

So whats the proper way to run wpa_supplicant as non-root?

Many thanks,

1

There are 1 best solutions below

0
On

All credit goes to Klaus D. for the correct answer. As he suggested the issue as the permissions on the sockets. Initially I only changed the permission of the actual socket (i.e. WiFi interface) but the actual containing folder needs to be set correctly also (i.e. var/run/supplicant).

Thanks Klaus & hope this helps someone else.