# Error with exec command fired from Node-Red

**URL:** https://discourse.nodered.org/t/error-with-exec-command-fired-from-node-red/66293
**Category:** General
**Created:** [10 August 2022 15:57 UTC](https://discourse.nodered.org/t/error-with-exec-command-fired-from-node-red/66293 "2022-08-10T15:57:18Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Tapani](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@Tapani](https://discourse.nodered.org/u/Tapani)
#### Post date: [10 August 2022 15:57 UTC](https://discourse.nodered.org/t/error-with-exec-command-fired-from-node-red/66293/1 "2022-08-10T15:57:18Z")

</div>

I’m running Node-Red with Home Assistant on Raspberry Pi.  
From Node-Red I fire the the following command:  
‘echo ds2482 0x18 \> /sys/bus/i2c/devices/i2c-1/new\_device’  
to initialise 1-wire reading.

Earlier this was working without errors but now I get the following error message:  
/bin/bash: line 1: /sys/bus/i2c/devices/i2c-1/new\_device: “Read-only file system”

If I run  
‘echo ds2482 0x18 \> /sys/bus/i2c/devices/i2c-1/new\_device’  
from the terminal, it works just fine.

The problem has started rather recently but I don’t know which operating system or Home Assistant or Node-Red version has starting to make this error.  
The problem seems to be related with file-access rights.  
Any explanation?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [10 August 2022 16:18 UTC](https://discourse.nodered.org/t/error-with-exec-command-fired-from-node-red/66293/2 "2022-08-10T16:18:37Z")

</div>

In HA does node red run inside a docker container? If so then if you run that command in a terminal inside the container does it work?

---

<div class="post-metadata">

### Author: ![Tapani](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@Tapani](https://discourse.nodered.org/u/Tapani)
#### Post date: [10 August 2022 16:29 UTC](https://discourse.nodered.org/t/error-with-exec-command-fired-from-node-red/66293/3 "2022-08-10T16:29:38Z")

</div>

Node-Red has been installed as HA add-on. I'm not an expert but I believe that HA and also the add-ons are run in a docker container.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [10 August 2022 16:37 UTC](https://discourse.nodered.org/t/error-with-exec-command-fired-from-node-red/66293/4 "2022-08-10T16:37:07Z")

</div>

So does the command work if you run it in a terminal inside the container. I don't know much about docker so you may have to google to find how to run a terminal in the container if you don't know. I generally avoid Docker (and HA).

---

<div class="post-metadata">

### Author: ![Tapani](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@Tapani](https://discourse.nodered.org/u/Tapani)
#### Post date: [10 August 2022 16:41 UTC](https://discourse.nodered.org/t/error-with-exec-command-fired-from-node-red/66293/5 "2022-08-10T16:41:57Z")

</div>

I'm using the very standard installation available on HA web pages.  
As I wrote in the original message, everything worked fine earlier but something  
has been changed in some of the recent updates.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [10 August 2022 16:47 UTC](https://discourse.nodered.org/t/error-with-exec-command-fired-from-node-red/66293/6 "2022-08-10T16:47:29Z")

</div>

You might be best to ask on an HA forum then.

---

<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: [9 October 2022 16:47 UTC](https://discourse.nodered.org/t/error-with-exec-command-fired-from-node-red/66293/7 "2022-10-09T16:47:42Z")

</div>

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