SiliconLabs / matter

Matter is creating more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
https://www.silabs.com/wireless/matter
Apache License 2.0
151 stars 45 forks source link

unify-matter-bridge should write files in LSB location #153

Open rzr opened 2 months ago

rzr commented 2 months ago

Description of the issue

Hi, I have been testing the matter bridge with z-wave, it works ! good job, if curious check:

z-wave-stack-silabs-pal-20240502

On 2023-05-03-raspios-bullseye-armhf I used the binary shared at:

https://github.com/SiliconLabs/matter/releases/download/v2.3.0-1.3-beta.1/unify-matter-bridge-2.3.0-1.3-beta.1.zip

And noticed it should be run as root to be able to write to /var as hardcoded in:

https://github.com/SiliconLabs/matter/blame/fac95f86f01f2ad61ae086ba1e0257f951b3a368/silabs_examples/unify-matter-bridge/linux/src/matter_bridge_config.cpp#L69

Steps to reproduce the issue

1. install 2023-05-03-raspios-bullseye-armhf on rpi
2. run bridge as user
3. observe perm errors

Device type(s) and network topology

N/A

Proposed solution(s)

I would prefer to run it as user and IIRC the LSB standard would suggest to write somewhere like /var/lib/uic/unify-matter-bridge/

I can submit patch if wanted

SMG version

release_2.2.0-1.2

Protocol(s)

Wi-Fi

Hardware platform(s)

rpi2

Development platform(s)

No response

Captured data or logs

No response