Page 2 of 2

Re: Router or camera restart

Posted: Sunday 26 July 2020 15:33
by waaren
cobra045 wrote: Sunday 26 July 2020 15:13 I don't understand, who can explain this to me ??
Check this for a detailed explanation
Or what is the correct rule for this?
$ sudo setcap cap_net_raw = + eip path_to_domoticz_executable
example (my domoticz binary is in /opt/domoticz directory)

Code: Select all

sudo setcap -v cap_net_raw+eip /opt/domoticz/domoticz    # returns >>  /opt/domoticz/domoticz: OK
sudo getcap /opt/domoticz/domoticz  #returns >> /opt/domoticz/domoticz = cap_net_raw+eip

Re: Router or camera restart

Posted: Sunday 26 July 2020 20:13
by cobra045
waaren wrote: Sunday 26 July 2020 15:33
cobra045 wrote: Sunday 26 July 2020 15:13 I don't understand, who can explain this to me ??
Check this for a detailed explanation
Or what is the correct rule for this?
$ sudo setcap cap_net_raw = + eip path_to_domoticz_executable
example (my domoticz binary is in /opt/domoticz directory)

Code: Select all

sudo setcap -v cap_net_raw+eip /opt/domoticz/domoticz    # returns >>  /opt/domoticz/domoticz: OK
sudo getcap /opt/domoticz/domoticz  #returns >> /opt/domoticz/domoticz = cap_net_raw+eip
Hallo Waaren,

Thanks for this super quick response.

Unfortunately, this information is too much for my limited knowledge.
The question is therefore do I need this for internal use?
I ran a test and it works.

I also looked at the paths on the SD card but can find /opt/ but not /opt/domoticz

Best regards, cobra045

Re: Router or camera restart

Posted: Sunday 26 July 2020 21:51
by waaren
cobra045 wrote: Sunday 26 July 2020 20:13 Unfortunately, this information is too much for my limited knowledge.
It is an explanation for why a non root user should get additional capabilities for certain tasks and an overview of what these capabilities are
The question is therefore do I need this for internal use?
If it works and you are OK with not knowing why it works, I am not the person to tell you if you need to understand it or not. There are probably very few people in he world understanding everything there is to know of a system like Linux
I also looked at the paths on the SD card but can find /opt/ but not /opt/domoticz
See my remark that my domoticz binary is in /opt/domoticz. Youre domoticz binary will most likely in another directory. Most users on a raspberry have installed it in the directory /home/pi/domoticz, but you can install it in any directory.

Re: Router or camera restart

Posted: Sunday 26 July 2020 23:34
by meyland
after running setcap, you need to restart your domoticz service. It took me a while to get it to work, and all I should do was to restart.

@waaren, I'm stille looking into the problem I have with the script.I have create a complete test enviroment, so I think is should be possible for me to finde the cause to the problem. I'm going for a week - so until next weekend .... :-)