Question about nodeRed Deployment

Hello Installing node-red, and the usefull contribs is quiet long and ‘complicated’. Question : After a PLC has been configured correctly with Node-Red, contribs and flows, is there a simple way to duplicate this configuration? Can we, for example, just copy the whole memory card to new memory card so that all the contents are duplicated? Is there an other way to deploy a valid configuration?

Hello Michel, Unfortunately it’s not possible to duplicate the entire contents of the SD Card, due to the specific format of the card. The simplest solution is probably to archive the contents of the directories that you’ve changed, and then unpack these on another controller. - Martin.

… just to add to the above answer, this thread discusses the same question: https://www.plcnext-community.net/index.php?option=com_easydiscuss&view;=post&id;=1177&Itemid;=221⟨=en#reply-1178

Hello Martin. I tried to download the files in the mentionned directory, but even if I log in with winSCP as admin, it seems that some files do not permit an acces (copy). (maybe about SSH, certificats, etc…) Is this normal? Can it lead to problem?

Hi Michel

In general it is good to understand that Admin does not have full rights
in Linux there are files and folders eith no copy, delete and write permissions
this is done for a reason .. so don’t do things when you are not completely sure that you know what you are doing :wink:

In some ocasions you have to do things which require elevated rights
For example modify startup scripts, or rewriting the webserver config to display a custom page instead of the PLCnext engineer page

to look into rights management on a specific folder login with putty
type ls -lsah (more info on the LS command)

[admin@axcf2152:~$](mailto:admin@axcf2152:~$) cd /etc/init.d  
> admin@axcf2152:/etc/init.d$ ls -lsah  
> total 116K  
> 1.0K drwxr-xr-x 2 root root 1.0K Feb 13 10:03 .  
> 8.0K drwxr-xr-x 1 root root 4.0K Feb 16 08:21 ..  
> 1.0K -rwxr-xr-x 1 root root  250 Nov  5 17:18 alignment.sh  
> 4.0K -rwxr--r-- 1 root root 3.5K Nov  5 18:03 axcf2152init  
> 1.0K -rwxr--r-- 1 root root  927 Nov  5 18:10 axcf2152lifesign  
> 3.0K -rwxr--r-- 1 root root 2.7K Nov  5 17:49 axio  
> 1.0K -rwxr-xr-x 1 root root  492 Nov  5 17:18 banner.sh  
> 2.0K -rwxr-xr-x 1 root root 2.0K Nov  5 18:02 bootlogd  
>   
> as you see there are 10 characters  
> DRWXRWXRWX  
> D = Directory = folder or - if not a folder  
> R = readpermisions (- if no permission to read)  
> W = write permissions (- if no permission to Write)  
> x = execute permisions (- if no permission to Execute)

There are 3 RWX groups
USER GROUP Others
in the above example alignement.sh is owned by the user Root, and has permisions -rwxr-xr-x
- it is not a directory
First rwx → user root has all permisions
second r-x all other users in the root group may only read and execute
last r-x all other users in all other groups may only read and execute

if you want to change permissions use the command chmod [permissions] [file]
like i do here:

admin@axcf2152:/etc/init.d$ sudo chmod 777 alignment.sh We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things: #1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility. Password:
Sorry, user admin is not allowed to execute ‘/bin/chmod 777 alignment.sh’ as root on axcf2152 .
admin@axcf2152:/etc/init.d$ When you do this you will see that even the admin with sudo rights is not allowed to do so!

the only option is to log in as the root user, this is at your own risk

sudo passwd root
will give you the opportunity to create a root password su
will log you in as root user

admin@axcf2152:/etc/init.d$ admin@axcf2152:/etc/init.d$
-sh: admin@axcf2152:/etc/init.d$: No such file or directory
admin@axcf2152:/etc/init.d$ sudo passwd root
Password:
Changing password for root
Enter the new password (minimum of 5 characters)
Please use a combination of upper and lower case letters and numbers.
New password:
Bad password: too short.
Warning: weak password (enter it again to use it anyway).
New password:
Re-enter new password:
passwd: password changed.
admin@axcf2152:/etc/init.d$ su
Password:
root@axcf2152:/etc/init.d# and there you are … logged in as root experience “god mode”
you can do everything and break everything!

try the chmod again root@axcf2152:/etc/init.d# chmod 777 alignment.sh
root@axcf2152:/etc/init.d# ls -lsah
total 126K
8.0K drwxr-xr-x 1 root root 4.0K Feb 13 10:03 .
8.0K drwxr-xr-x 1 root root 4.0K Feb 16 08:42 ..
4.0K -rwxrwxrwx 1 root root 250 Nov 5 17:18 alignment.sh the permissions have changed now
actually you do not have to changed permissions because you can do everything as root user yourself

Take care … and be carefull ?

Jan-Willem