<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Error reading files after runtime update from 4.0.0.0 to 4.8.0.0</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/5cac1390b4/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/5cac1390b4/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/5cac1390b4/</id><updated>2024-05-07T14:45:48.276000Z</updated><subtitle>Recent posts to Error reading files after runtime update from 4.0.0.0 to 4.8.0.0</subtitle><entry><title>Error reading files after runtime update from 4.0.0.0 to 4.8.0.0</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/5cac1390b4/?limit=25#b83c" rel="alternate"/><published>2024-05-07T14:45:48.276000Z</published><updated>2024-05-07T14:45:48.276000Z</updated><author><name>leandroct</name><uri>https://forge.codesys.com/u/leandroct/</uri></author><id>https://forge.codesys.com0768386ef1777a16e6aa5731f12c07d1815d8485</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Since version 19 they changed how file access is handle.&lt;br/&gt;
There are two solutions:&lt;br/&gt;
1.  You change where the file is stored (need to go to: /PlcLogic/)&lt;br/&gt;
2.  You can, if you don´t want to store at PlcLogic, add the following line in the CODESYSControl.cfg under &lt;span&gt;[SysFile]&lt;/span&gt;: ForceIecFilePath=0&lt;br/&gt;
The CodesysControl.cfg is at C:\ProgramData\CODESYS\CODESYSControlWinV3x64\xxPROJECT_NUMBERxx\&lt;br/&gt;
Here the email they sent:&lt;br/&gt;
"with the 3.5.19 Version we changed how files are handled.&lt;br/&gt;
See following issue: CDS-81506 - CODESYS Control SysFile system file access vulnerability.&lt;br/&gt;
There are two solutions:&lt;br/&gt;
1.  You change where the file is stored (need to go to: /PlcLogic/)&lt;br/&gt;
2.  You can, if you don´t want to store at PlcLogic, add the following line in the CODESYSControl.cfg under &lt;span&gt;[SysFile]&lt;/span&gt;: ForceIecFilePath=0&lt;br/&gt;
Here is the official release-note:&lt;br/&gt;
[[COMPATIBILITY_INFORMATION]]&lt;br/&gt;
With the activation of ForceIecFilePath the file access from IEC is now restricted to the configured paths only (file sandbox)!&lt;br/&gt;
&lt;span&gt;[SysFile]&lt;/span&gt;&lt;br/&gt;
ForceIecFilePath=1 (new default)&lt;br/&gt;
The standard path is the current directory, the PlcLogic subfolder or a configured path. Every file access outside of this path is configured via PlaceholderFilePath, for example access to temporary files or removable media:&lt;br/&gt;
&lt;span&gt;[SysFile]&lt;/span&gt;&lt;br/&gt;
PlaceholderFilePath.1=/tmp, $TMP$&lt;br/&gt;
PlaceholderFilePath.2=/media/usb, $USB$&lt;br/&gt;
PlaceholderFilePath.2.Volatile=1&lt;br/&gt;
For more information see our tutorial FilePath &amp;amp; Placeholders.&lt;br/&gt;
To restore the old behavior ForceIecFilePath may be configured as follows:&lt;br/&gt;
&lt;span&gt;[SysFile]&lt;/span&gt;&lt;br/&gt;
ForceIecFilePath=0&lt;br/&gt;
BUT WE HIGHLY RECOMMEND TO LEAVE THIS SETTING AT ITS NEW DEFAULT VALUE!&lt;br/&gt;
"&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Error reading files after runtime update from 4.0.0.0 to 4.8.0.0</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/5cac1390b4/?limit=25#268e" rel="alternate"/><published>2023-05-15T07:17:37.909000Z</published><updated>2023-05-15T07:17:37.909000Z</updated><author><name>ajadhav</name><uri>https://forge.codesys.com/u/ajadhav/</uri></author><id>https://forge.codesys.comcaa9387abf37a7eaa57f7d3629dca49b3f27326d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I also had noticed the same problem.Infact the file access with SysFileOpen was working till CODESYS Control for Raspberry Pi MC SL V 4.6.0.0&lt;/p&gt;
&lt;p&gt;Manual editing of user.cfg file wouldnt be a desirable method especially for Codesys IO libary packages which need some specific file access in some working directory in linux.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Error reading files after runtime update from 4.0.0.0 to 4.8.0.0</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/5cac1390b4/?limit=25#f68b" rel="alternate"/><published>2023-05-11T08:42:05.509000Z</published><updated>2023-05-11T08:42:05.509000Z</updated><author><name>hence.persson</name><uri>https://forge.codesys.com/u/hence-persson/</uri></author><id>https://forge.codesys.coma059780de02c2eed581214425a480413024cb783</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;After much digging I found the following (Attachement)&lt;br/&gt;
So can i change it in the user.cfg file ? And what should the section in that case in the cfg file be named?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Error reading files after runtime update from 4.0.0.0 to 4.8.0.0</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/5cac1390b4/?limit=25#3907" rel="alternate"/><published>2023-05-10T15:18:55.540000Z</published><updated>2023-05-10T15:18:55.540000Z</updated><author><name>hence.persson</name><uri>https://forge.codesys.com/u/hence-persson/</uri></author><id>https://forge.codesys.com93e16c60c3622bff655bb0e9858cb26c7f0fdc09</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Checked the log and nothing there regarding reading my file but the following messages were availible.. Something about sysfile... Maybe helps...?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Error reading files after runtime update from 4.0.0.0 to 4.8.0.0</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/5cac1390b4/?limit=25#87af" rel="alternate"/><published>2023-05-10T14:43:48.917000Z</published><updated>2023-05-10T14:43:48.917000Z</updated><author><name>hence.persson</name><uri>https://forge.codesys.com/u/hence-persson/</uri></author><id>https://forge.codesys.comc38bcbea1f968e582f319b7bda7ccd43841e5960</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Working code: ~~~&lt;br/&gt;
OpenFile := SysFileOpen(szFile:=BMS_GVLconstants.SystemFilePath, am:=.Sysfile.AM_READ, pResult:=ADR(udiOpenError));&lt;br/&gt;
~~~&lt;br/&gt;
Doesnt work anymore the OpenFile has the value 16#FFFFFFFF and pResult = 39&lt;/p&gt;
&lt;p&gt;In desperation I also tried the CAA_FILE lib to read the file and that returns the error FILE_OPERATION_DENIED.&lt;/p&gt;
&lt;p&gt;As everything worked before, the files are present and the permissions are the same I blame codesys..&lt;br/&gt;
I even tried to change the file permissions to 777 and change the user and group to no avail.&lt;br/&gt;
Hopefully someone can point me in the correct direction.&lt;/p&gt;
&lt;p&gt;Earlier I used Codesys 3.5.16.30 for enginnering and 4.0.0.0 as runtime&lt;br/&gt;
Now I use Codesys 3.5.19.0 for engineering and 4.8.0.0 as runtime and all devices and librarys updated to latest versions.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>