# Need to run DHT node with root privileges

**URL:** <https://discourse.nodered.org/t/need-to-run-dht-node-with-root-privileges/32417>\
**Category:** General\
**Created:** [3 September 2020 17:55 UTC](https://discourse.nodered.org/t/need-to-run-dht-node-with-root-privileges/32417 "2020-09-03T17:55:34Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rufus\_0815](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@Rufus\_0815](https://discourse.nodered.org/u/Rufus_0815)\
**Post date:** [3 September 2020 17:55 UTC](https://discourse.nodered.org/t/need-to-run-dht-node-with-root-privileges/32417/1 "2020-09-03T17:55:35Z")

</div>

Hi

i am new to linux. I use it for my garden irritation and ventilation.

problem is that the node for my dht22 sensors only works when it´s started with root privilegs.  
With standard user it won´t show me measurements.  
Could you help me?

---

<div class="post-metadata">

**Author:** ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)\
**Post date:** [3 September 2020 18:02 UTC](https://discourse.nodered.org/t/need-to-run-dht-node-with-root-privileges/32417/2 "2020-09-03T18:02:39Z")

</div>

Are you absolutely sure that the problem is due to not being root? I have 5 pi's running DHT 11. and DHT 22 sensors with no issues. Perhaps you can explain your reasoning behind this and your methodology?

---

<div class="post-metadata">

**Author:** ![Rufus\_0815](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@Rufus\_0815](https://discourse.nodered.org/u/Rufus_0815)\
**Post date:** [3 September 2020 18:54 UTC](https://discourse.nodered.org/t/need-to-run-dht-node-with-root-privileges/32417/3 "2020-09-03T18:54:29Z")

</div>

Hi

I m Sure. If i Start with the "normal" User i cannot get any Temperatures or humidity.  
Started with root it works.

I use the node-red-contrib-dht-sensor node

---

<div class="post-metadata">

**Author:** ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)\
**Post date:** [3 September 2020 19:10 UTC](https://discourse.nodered.org/t/need-to-run-dht-node-with-root-privileges/32417/4 "2020-09-03T19:10:32Z")

</div>

How did you install node red?

---

<div class="post-metadata">

**Author:** ![Rufus\_0815](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@Rufus\_0815](https://discourse.nodered.org/u/Rufus_0815)\
**Post date:** [3 September 2020 19:17 UTC](https://discourse.nodered.org/t/need-to-run-dht-node-with-root-privileges/32417/5 "2020-09-03T19:17:25Z")

</div>

Via the openhabian-config Tool.

---

<div class="post-metadata">

**Author:** ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)\
**Post date:** [3 September 2020 19:27 UTC](https://discourse.nodered.org/t/need-to-run-dht-node-with-root-privileges/32417/6 "2020-09-03T19:27:25Z")

</div>

I'm going to suggest that maybe your installation is the issue. There is a install script that I think most use to install it. I can't find a link right now but if you search this forum or even just Google it on the web you will probably find it. I use the dht sensor node on my installations with no problems so I'm confident that's not the issue. You don't want to run as root and don't need to so my first recommendation would be to reinstall using the script

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [3 September 2020 20:16 UTC](https://discourse.nodered.org/t/need-to-run-dht-node-with-root-privileges/32417/7 "2020-09-03T20:16:41Z")

</div>

You might want to ask on the openhabit forum

---

<div class="post-metadata">

**Author:** ![Rufus\_0815](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@Rufus\_0815](https://discourse.nodered.org/u/Rufus_0815)\
**Post date:** [4 September 2020 02:23 UTC](https://discourse.nodered.org/t/need-to-run-dht-node-with-root-privileges/32417/8 "2020-09-04T02:23:35Z")

</div>

Okay i´ll ask on the openhab forum.

But in the notes of the node ist this NOTE:

> Blockquote Notes:

- The temperature values is in °C and the humidity values are % relative humidity.
- If you're using an older release of the DHT2385 driver, you will have to run node-RED as root, otherwise you may run into problems with permissions.

I am using the last BMC2385 version.

---

<div class="post-metadata">

**Author:** ![Rufus\_0815](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@Rufus\_0815](https://discourse.nodered.org/u/Rufus_0815)\
**Post date:** [18 September 2020 14:37 UTC](https://discourse.nodered.org/t/need-to-run-dht-node-with-root-privileges/32417/9 "2020-09-18T14:37:22Z")

</div>

Hi folks. I changed to the BME280 it works correct .

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [17 November 2020 14:37 UTC](https://discourse.nodered.org/t/need-to-run-dht-node-with-root-privileges/32417/10 "2020-11-17T14:37:27Z")

</div>

Closed on 17 November 2020 14:37 UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
