Hello, I would like to understand if there is any way to „protect“ some files from being deleted during a PLCNE project download. I’m using datalogger service, but I have to create textually the configuration file because of some limitations in PLCNE 2021.6 interface (ex. Max sample time 65535 ms). So, I have my pcwe.myDatalogger.dl.config that I place in /opt/plcnext/projects/PCWE/Services/DataLogger. (and using file is even better because I can change datalogger settings keeping the same PLCNE project) At the same time my PLCNE project creates a file in the webserver directory /opt/plcnext/projects/PCWE/Services/Ehmi/ehmi (The file has to be placed there because I’m using a web client to reach that same file.) Both these files are deleted after a project download. Looking at other files it seems that the user who clean and place files in that directories is „plcnext_firmware“. So I tried to change file permission from admin (and even from root) with: [quote]chmod 744 filename [/quote] but without any effect… So, is there any way to „protect“ them? Or just one of them? (file on webserver folder is the most important) Thanks a lot, Marcello
Hello Marcello, there is no way to protect files in the PCWE folder that folder will be wiped by the PLCnext Engineer at every download. If you want to have static access to the WebServer file please use another directory. for example ln -s /opt/plcnext/actualFile /var/www/plcnext/welcome/SomeFile chown www:www-data /opt/plcnext/actualFile same goes for the datalogger configuration. You can place that static config in a seperate location that will be not wiped but still gets loaded. (you will not be able to see it in Engineer then.) for example „projects/Services/datalogger/*.config“ kind regards, Oliver
[quote]for example „projects/Services/datalogger/*.config“[/quote]Out of interest, you can tell that files with that suffix in that directory can be used to configure the data logger by looking at this file on the PLC: /etc/plcnext/device/Services/DataLogger/dataLogger.settings The data logger reads this settings file on startup, and then loads any configuration files that match the pattern in the ConfigSettings section.
Hello Oliver, hello Martin, thank you both for your reply. @Oliver: If I understand correctly, for datalogger config you suggested to use an hard link. So I tried with: mkdir /opt/plcnext/projects/PCWE/Services/DataLogger/ ln -s /opt/plcnext/projects/myProject/pcwe.DL_AI.dl.config /opt/plcnext/projects/PCWE/Services/DataLogger/pcwe.DL_AI.dl.config \t\t But during project download /opt/plcnext/projects/PCWE/Services/DataLogger/ and the file were deleted anyway. There is something missing in my command? Otherwise, I’ll go for the way Martin suggested (I was trying to not use root privileges) Thanks, Marcello
Hello Marcello, if you want to manually configure the Datalogger Config file you will need to move it to a location outside of the PCWE folder. (and disable the Datalogger Config in the Engineer project afterwards.) [quote]for example „projects/Services/DataLogger/*.config“[/quote]
It works! Thanks, Marcello