RESOLVED: Bug report: upgrade to 1.2.9 broke permissions

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.

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.

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 :frowning: not helpful i know...

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'

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 ?

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

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 ..

how about ls -lart ?

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 .

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

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

How can I revert it?

It seems a snap refresh node-red did the trick. :ok_hand:

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)

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.

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!

Well thank you for finding and reporting it so quickly.

Thanks is working perfectly now :smiley:

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