# EROFS: read-only file system,

**URL:** <https://discourse.nodered.org/t/erofs-read-only-file-system/31234>\
**Category:** General\
**Created:** [6 August 2020 16:01 UTC](https://discourse.nodered.org/t/erofs-read-only-file-system/31234 "2020-08-06T16:01:00Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zerg](https://avatars.discourse-cdn.com/v4/letter/z/6de8d8/32.png) [@Zerg](https://discourse.nodered.org/u/Zerg)\
**Post date:** [6 August 2020 16:01 UTC](https://discourse.nodered.org/t/erofs-read-only-file-system/31234/1 "2020-08-06T16:01:00Z")

</div>

I am trying to create a file at the specified path, but I get an error.

```auto
failed to create file: Error: EROFS: read-only file system, mkdir '/opt/zigbee2mqttD'

```

link on screen: [https://ibb.co/FWMfySy](https://ibb.co/FWMfySy)  
OS - Ubunta 20.04  
FS - BTRFS  
code: [https://pastebin.com/yXC763MK](https://pastebin.com/yXC763MK)  
What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [6 August 2020 16:15 UTC](https://discourse.nodered.org/t/erofs-read-only-file-system/31234/2 "2020-08-06T16:15:08Z")

</div>

Your flow worked for me , with the following remarks:

1- Changed directory from `/opt/zigbee2mqttD` to `opt/zigbee2mqtt`

2- My Node-RED user (odroid in my case) has permission to read/write in above directory.

> odroid@odroid:/opt/zigbee2mqtt/data$ ls -halt  
> total 32K  
> drwxr-xr-x 3 odroid odroid 4.0K Aug 6 13:10 .  
> -rw-r--r-- 1 odroid odroid 14 Aug 6 13:10 test.log  
> -rw-rw-r-- 1 odroid odroid 874 Aug 6 13:07 state.json  
> -rw-r--r-- 1 odroid odroid 5.2K Aug 3 15:21 database.db  
> drwxrwxr-x 9 odroid odroid 4.0K Aug 1 10:37 log  
> -rw-r--r-- 1 odroid odroid 403 Aug 1 10:36 configuration.yaml  
> drwxr-xr-x 12 odroid odroid 4.0K Aug 1 00:17 ..

> odroid@odroid:/opt/zigbee2mqtt/data$ cat test.log  
> 1596730219095  
> odroid@odroid:/opt/zigbee2mqtt/data$

---

<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:** [6 August 2020 16:22 UTC](https://discourse.nodered.org/t/erofs-read-only-file-system/31234/3 "2020-08-06T16:22:15Z")

</div>

> [@Zerg](#):
>
> `EROFS: read-only file system,`

EROFS stands for Enhanced Read Only File System, so you need to find why the file system is read only.

How did you install node-red and how do you run it?

---

<div class="post-metadata">

**Author:** ![Zerg](https://avatars.discourse-cdn.com/v4/letter/z/6de8d8/32.png) [@Zerg](https://discourse.nodered.org/u/Zerg)\
**Post date:** [6 August 2020 16:23 UTC](https://discourse.nodered.org/t/erofs-read-only-file-system/31234/4 "2020-08-06T16:23:02Z")

</div>

Thanks for the quick response!  
How do you know which user is the Node-red server? or is it the user which I created for login into system (Ubuntu)?

---

<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:** [6 August 2020 16:23 UTC](https://discourse.nodered.org/t/erofs-read-only-file-system/31234/5 "2020-08-06T16:23:36Z")

</div>

> [@Zerg](#):
>
> How do you know which user is the Node-red server

That is determined by how you installed and run it.

---

<div class="post-metadata">

**Author:** ![Zerg](https://avatars.discourse-cdn.com/v4/letter/z/6de8d8/32.png) [@Zerg](https://discourse.nodered.org/u/Zerg)\
**Post date:** [6 August 2020 16:25 UTC](https://discourse.nodered.org/t/erofs-read-only-file-system/31234/6 "2020-08-06T16:25:54Z")

</div>

i installed it like this!  
sudo apt install snap snapd  
sudo snap install node-red  
sudo apt-get autoremove  
And I launch it simply by entering the address in the browser  
[http://192.168.18.101:1880](http://192.168.18.101:1880)

---

<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:** [6 August 2020 16:30 UTC](https://discourse.nodered.org/t/erofs-read-only-file-system/31234/7 "2020-08-06T16:30:45Z")

</div>

I don't know about using the snap. The way most (I believe) do it on Ubuntu is to use the [pi/ubuntu install script](https://nodered.org/docs/getting-started/raspberrypi). Whether anyone here will be able to help with a snap install I don't know, but if you were to remove that and run the script instead then there will definitely be help available. Though I don't think normal users have the permissions to create files in /opt so that might be the problem you are encountering.

---

<div class="post-metadata">

**Author:** ![Zerg](https://avatars.discourse-cdn.com/v4/letter/z/6de8d8/32.png) [@Zerg](https://discourse.nodered.org/u/Zerg)\
**Post date:** [6 August 2020 16:33 UTC](https://discourse.nodered.org/t/erofs-read-only-file-system/31234/8 "2020-08-06T16:33:43Z")

</div>

Ok, thanks! I will delete Node-Rde and will install it according to your links ...

---

<div class="post-metadata">

**Author:** ![Zerg](https://avatars.discourse-cdn.com/v4/letter/z/6de8d8/32.png) [@Zerg](https://discourse.nodered.org/u/Zerg)\
**Post date:** [6 August 2020 18:40 UTC](https://discourse.nodered.org/t/erofs-read-only-file-system/31234/9 "2020-08-06T18:40:46Z")

</div>

Ok, now I installed Node-Red by the script! There were no errors during installation! I trying to repeat the command again  
code:[https://pastebin.com/yXC763MK](https://pastebin.com/yXC763MK)  
and get a slightly different error.  
`failed to create file: Error: EACCES: permission denied, mkdir '/opt/zigbee2mqtt'`  
What to do now? Can someone help me?

screen: [https://ibb.co/B6T3Bgg](https://ibb.co/B6T3Bgg)

---

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [6 August 2020 19:10 UTC](https://discourse.nodered.org/t/erofs-read-only-file-system/31234/10 "2020-08-06T19:10:53Z")

</div>

How did you install zigbee2mqtt?

```auto
sudo git clone https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt
sudo chown -R pi:pi /opt/zigbee2mqtt 

```

In my own small install script I change the owner as soon as I cloned the git repository to the user, which starts also Node-RED (in my case `pi`)

---

<div class="post-metadata">

**Author:** ![Zerg](https://avatars.discourse-cdn.com/v4/letter/z/6de8d8/32.png) [@Zerg](https://discourse.nodered.org/u/Zerg)\
**Post date:** [6 August 2020 19:20 UTC](https://discourse.nodered.org/t/erofs-read-only-file-system/31234/11 "2020-08-06T19:20:01Z")

</div>

Thanks, everything is working now! 🙂

---

<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:** [20 August 2020 19:20 UTC](https://discourse.nodered.org/t/erofs-read-only-file-system/31234/12 "2020-08-20T19:20:15Z")

</div>

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