Ran into an error with the latest Node-Red for PLCnext ARM (3.0.2.1) application package.
Unable_To_Deploy.png
Deploy failed: {"code":"EPERM","message":"EPERM: operation not permitted, rename '/data/flows.json.$$$' -> '/data/flows.json'"}
The temporary file is unable to write the flows.json file, which is owned by root. I am uncertain of the exact point when this file is created/copied with the store app package. This will be an issue for anyone using this package.
The workaround I found was to chown the file from the PLCnext shell:
root@axcf2152:/opt/plcnext/appshome/data/60002172000507/volumes/node-red# ls -l
total 520
-rwsrwsrwt 1 root root 79 Feb 3 15:17 IIoTGatewayConnector_cred.json
drwsrwsrwt 2 root root 4096 Feb 3 15:27 certificates
drwsrwsrwt 2 root root 4096 Feb 3 15:17 config
-rwsrwsrwt 1 root root 26830 Feb 4 00:26 flows.json
-rwxrwxrwt 1 tss root 18415 Feb 4 00:26 'flows.json.$$$'
-rwsrwsrwt 1 tss root 51 Feb 3 15:29 flows_cred.json
drwsrwsrwt 3 tss root 4096 Feb 3 15:27 lib
drwsrwsrwt 391 tss root 20480 Feb 4 00:10 node_modules
-rwxrwxrwt 1 tss root 410556 Feb 4 00:10 package-lock.json
-rwxrwxrwt 1 tss root 299 Feb 4 00:10 package.json
-rwsrwsrwt 1 root root 22423 Feb 3 15:17 settings.js
root@axcf2152:/opt/plcnext/appshome/data/60002172000507/volumes/node-red# chown tss flows.json
