# RESOLVED: Bug report: upgrade to 1.2.9 broke permissions

**URL:** <https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757>\
**Category:** General\
**Created:** [10 February 2021 15:51 UTC](https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757 "2021-02-10T15:51:58Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![somekindof](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@somekindof](https://discourse.nodered.org/u/somekindof)\
**Post date:** [10 February 2021 15:51 UTC](https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757/1 "2021-02-10T15:51:58Z")

</div>

Hello everyone,

I think I've experienced a bug when auto upgrading to v1.2.9.  
I'm running the snap version of node red on a centos 8 system. Today the node red snap has been automatically upgraded to v1.2.9. After that, the daemon was not able to start the service anymore.

These are the corresponding lines in the log file.

```auto
10 Feb 14:14:13 - [info] Dashboard version 2.24.0 started at /ui
10 Feb 14:14:14 - [error] Failed to start server:
10 Feb 14:14:14 - [error] Error: EPERM: operation not permitted, copyfile '/root/snap/node-red/671/.config.nodes.json' -> '/root/snap/node-red/671/.config.nodes.json.backup'

```

After discovering this I checked the permissions corresponding to that folder but I couldn't see anything unusual. The snap is running as user root and the permissions seem to be correct. To be sure I double checked the folder permissions using getfacl and set them to 777, just to be sure. That didn't help.

Any ideas how to tackle this error? It looks very much like a bug to me, especially because node red worked just fine until the upgrade.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [10 February 2021 16:28 UTC](https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757/2 "2021-02-10T16:28:23Z")

</div>

Odd - not sure why it would have a permissions problem when running as root.  
We don't do anything specific about permissions as we have never had to.  
Worked fine when I tested it on ubuntu ☹ not helpful i know...

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://discourse.nodered.org/u/Manish)\
**Post date:** [10 February 2021 16:51 UTC](https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757/3 "2021-02-10T16:51:50Z")

</div>

I have exactly the same issue.

10 Feb 16:43:54 - [info] Node-RED version: v1.2.9  
10 Feb 16:43:54 - [info] Node.js version: v14.15.5  
10 Feb 16:43:54 - [info] Linux 5.4.0-1032-kvm x64 LE  
10 Feb 16:43:54 - [info] Loading palette nodes  
10 Feb 16:43:55 - [info] Worldmap version 2.5.6  
10 Feb 16:43:55 - [info] Dashboard version 2.23.4 started at /ui  
10 Feb 16:43:55 - [error] Failed to start server:  
10 Feb 16:43:55 - [error] Error: EPERM: operation not permitted, copyfile '/root/snap/node-red/671/.config.nodes.json' -\> '/root/snap/node-red/671/.config.nodes.json.backup'

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [10 February 2021 17:11 UTC](https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757/4 "2021-02-10T17:11:18Z")

</div>

What are the permission on those files ? (and the directory they are in)  
can you try `sudo chmod a+r ...` on both ? or manual copy across once ?

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://discourse.nodered.org/u/Manish)\
**Post date:** [10 February 2021 17:14 UTC](https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757/5 "2021-02-10T17:14:10Z")

</div>

root@systam-ubuntu2:~/snap/node-red/671# chmod 777 /snap/node-red/671  
chmod: changing permissions of '/snap/node-red/671': Read-only file system

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://discourse.nodered.org/u/Manish)\
**Post date:** [10 February 2021 17:22 UTC](https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757/6 "2021-02-10T17:22:33Z")

</div>

total 604K  
-rw-r--r-- 1 root root 14K Nov 11 15:44 settings.js  
-rw-r--r-- 1 root root 438 Nov 20 12:23 package.json  
-rw-r--r-- 1 root root 56K Nov 20 12:23 package-lock.json  
drwxr-xr-x 107 root root 4.0K Nov 20 12:25 node\_modules  
drwxr-xr-x 3 root root 4.0K Nov 11 15:01 lib  
-rw-r--r-- 1 root root 209K Feb 10 14:37 flows.json  
-rw-r--r-- 1 root root 713 Feb 4 11:25 .sessions.json  
drwxr-xr-x 4 root root 4.0K Nov 20 12:23 .npm  
-rw-r--r-- 1 root root 209K Feb 10 14:36 .flows.json.backup  
-rw-r--r-- 1 root root 666 Feb 10 15:19 .config.users.json  
-rw-r--r-- 1 root root 95 Feb 10 15:19 .config.runtime.json  
-rw-r--r-- 1 root root 2 Feb 10 15:19 .config.projects.json  
-rw-r--r-- 1 root root 26K Feb 10 15:19 .config.nodes.json  
-rw-r--r-- 1 root root 19K Nov 20 12:23 .config.json.backup  
-rw-r--r-- 1 root root 19K Nov 20 12:26 .config.json  
drwxr-xr-x 5 root root 4.0K Feb 10 15:19 ..

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [10 February 2021 17:22 UTC](https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757/7 "2021-02-10T17:22:48Z")

</div>

how about ls -lart ?

```auto
root@mate:~/snap/node-red/671# ls -lart
total 68
drwxr-xr-x 4 root root 4096 Feb 10 17:17 ..
-rw-r--r-- 1 root root 13261 Feb 10 17:17 settings.js
drwxr-xr-x 2 root root 4096 Feb 10 17:17 node_modules
drwxr-xr-x 3 root root 4096 Feb 10 17:17 lib
-rw-r--r-- 1 root root 120 Feb 10 17:17 package.json
-rw-r--r-- 1 root root 15231 Feb 10 17:17 .config.nodes.json
-rw-r--r-- 1 root root 95 Feb 10 17:17 .config.runtime.json
-rw-r--r-- 1 root root 331 Feb 10 17:19 .config.users.json
-rw-r--r-- 1 root root 44 Feb 10 17:19 flows_cred.json
-rw-r--r-- 1 root root 568 Feb 10 17:19 flows.json
drwxr-xr-x 4 root root 4096 Feb 10 17:19 .

```

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://discourse.nodered.org/u/Manish)\
**Post date:** [10 February 2021 17:26 UTC](https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757/8 "2021-02-10T17:26:35Z")

</div>

root@systam-ubuntu2:~/snap/node-red/671# ls -lart  
total 612  
drwxr-xr-x 3 root root 4096 Nov 11 15:01 lib  
-rw-r--r-- 1 root root 13440 Nov 11 15:44 settings.js  
-rw-r--r-- 1 root root 438 Nov 20 12:23 package.json  
-rw-r--r-- 1 root root 57200 Nov 20 12:23 package-lock.json  
drwxr-xr-x 4 root root 4096 Nov 20 12:23 .npm  
drwxr-xr-x 107 root root 4096 Nov 20 12:25 node\_modules  
-rw-r--r-- 1 root root 19168 Nov 20 12:26 .config.json  
-rw-r--r-- 1 root root 713 Feb 4 11:25 .sessions.json  
-rw-r--r-- 1 root root 213802 Feb 10 14:36 .flows.json.backup  
-rw-r--r-- 1 root root 213803 Feb 10 14:37 flows.json  
drwxr-xr-x 5 root root 4096 Feb 10 15:19 ..  
-rw-r--r-- 1 root root 666 Feb 10 15:19 .config.users.json  
-rw-r--r-- 1 root root 95 Feb 10 15:19 .config.runtime.json  
-rw-r--r-- 1 root root 2 Feb 10 15:19 .config.projects.json  
-rw-r--r-- 1 root root 26159 Feb 10 15:19 .config.nodes.json  
-rw-r--r-- 1 root root 26159 Feb 10 17:24 .config.json.backup

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [10 February 2021 17:46 UTC](https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757/9 "2021-02-10T17:46:18Z")

</div>

OK - have reverted it for now... if anyone has any ideas let me know.

---

<div class="post-metadata">

**Author:** ![acalatrava](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/acalatrava/32/36883_2.png) [@acalatrava](https://discourse.nodered.org/u/acalatrava)\
**Post date:** [10 February 2021 17:49 UTC](https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757/10 "2021-02-10T17:49:41Z")

</div>

How can I revert it?

---

<div class="post-metadata">

**Author:** ![acalatrava](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/acalatrava/32/36883_2.png) [@acalatrava](https://discourse.nodered.org/u/acalatrava)\
**Post date:** [10 February 2021 17:51 UTC](https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757/11 "2021-02-10T17:51:58Z")

</div>

It seems a `snap refresh node-red` did the trick. 👌

---

<div class="post-metadata">

**Author:** ![somekindof](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@somekindof](https://discourse.nodered.org/u/somekindof)\
**Post date:** [10 February 2021 18:41 UTC](https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757/12 "2021-02-10T18:41:27Z")

</div>

Hi again

and thanks for picking up this topic so quickly. I'm very surprised and happy at the same time.

> What are the permission on those files ?

> how about ls -lart ?

That's what I checked before I posted. They all looked fine, similar to the listing you posted and to the directory of the running revision.

> or manual copy across once ?

I tried that before, too. I was able to copy the file with no issues. Changing permissions worked flawlessly, too. I did **not** run into the error message Manish posted, telling about a read-only file system.

Neither of those did solve the initial error, though.

> OK - have reverted it for now... if anyone has any ideas let me know.

> It seems a `snap refresh node-red` did the trick.

After I had posted the issue, i reverted the node-red snap to the previous version which was up and running instantly.  
After reading your answers, I did a refresh and now I've got a running 1.2.6 (snap rev. 667).

Just for the record:

- The version I was running until this morning was rev. 630, which is some 1.1.x-ish version.
- The version which came with the auto upgrade was the mentioned 1.2.9 (rev. 671)
- after reverting and refreshing (and you meanwhile rolling back the 1.2.9) the snap has been upgraded to v1.2.6 (rev. 667)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [10 February 2021 19:52 UTC](https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757/13 "2021-02-10T19:52:41Z")

</div>

OK - have redone latest 1.2.9 - so retry again.

The only difference between this and the previous broken one was that I bumped nodejs up to 14.x - This is still on 10.x which goes EOL in April... why changing node.js version should change r/w permissions is beyond me.

---

<div class="post-metadata">

**Author:** ![somekindof](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@somekindof](https://discourse.nodered.org/u/somekindof)\
**Post date:** [10 February 2021 22:04 UTC](https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757/14 "2021-02-10T22:04:10Z")

</div>

Thanks a lot!

This looks good. Version 1.2.9 is now shown as snap revision 675. It is running without any recognizable error so far.

I am so overwhelmed that this issue has been resolved within a few hours. You're awesome!

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [10 February 2021 22:43 UTC](https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757/15 "2021-02-10T22:43:53Z")

</div>

Well thank you for finding and reporting it so quickly.

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://discourse.nodered.org/u/Manish)\
**Post date:** [10 February 2021 22:46 UTC](https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757/16 "2021-02-10T22:46:52Z")

</div>

Thanks is working perfectly 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:** [24 February 2021 22:47 UTC](https://discourse.nodered.org/t/resolved-bug-report-upgrade-to-1-2-9-broke-permissions/40757/17 "2021-02-24T22:47:29Z")

</div>

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