I am working with 'Codesys Control For Raspberry Pi'(v 4.9.0.0) and I am facing a very strange issue-
I am unable to create a text file. I am getting an error -"FILE_OPERATION_DENIED"(5114) during File Open.
I am able to create a .txt file manually in the same location. I also tried giving the entire folder full read, write and modify access to all the users using - sudo chmod (my_file_path) a+rwx. Yet, still I am getting the same error. The Recipe Manager that was working fine in my previous device is also not running now.
Best Regards,
Suyash Thatte
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, I just changed the FILE.OPEN path to "/var/opt/codesys/PLClogic/" still getting the same error. Also, I manually tried creating both a file and directory inside the above location, I am not able to create it.
Please correct me if there is an understanding gap.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@eschwellinger Thanks a lot for your help.
However I am unable to understand the root cause behind the failure. The directory that I was writing the file to had rwx access to all users and groups. I had also tried creating and modifying a text file using python which was successful. Why is it failing with Codesys runtime?
Regards,
Suyash
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@eschwellinger does FILE.Copy fails with FILE_OPERATION_DENIED when copying outside from the IEC path for the same reason? I'm looking for a workaround to this limitation.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear all,
I am working with 'Codesys Control For Raspberry Pi'(v 4.9.0.0) and I am facing a very strange issue-
I am unable to create a text file. I am getting an error -"FILE_OPERATION_DENIED"(5114) during File Open.
I am able to create a .txt file manually in the same location. I also tried giving the entire folder full read, write and modify access to all the users using - sudo chmod (my_file_path) a+rwx. Yet, still I am getting the same error. The Recipe Manager that was working fine in my previous device is also not running now.
Best Regards,
Suyash Thatte
use the PLClogic directory to read / write files.
/var/opt/codesys/PLClogic/
this is due security reasons forced to use.
Ok, I just changed the FILE.OPEN path to "/var/opt/codesys/PLClogic/" still getting the same error. Also, I manually tried creating both a file and directory inside the above location, I am not able to create it.
Please correct me if there is an understanding gap.
the file path in IEC is $$PLCLogic$$ instead of /var/opt/codesys/PlcLogic
@eschwellinger Thanks a lot for your help.
However I am unable to understand the root cause behind the failure. The directory that I was writing the file to had rwx access to all users and groups. I had also tried creating and modifying a text file using python which was successful. Why is it failing with Codesys runtime?
Regards,
Suyash
because of security reason it is not allowed anymore to access files outside the IEC accsible path.
@eschwellinger does FILE.Copy fails with FILE_OPERATION_DENIED when copying outside from the IEC path for the same reason? I'm looking for a workaround to this limitation.
Found it! Set ForceIecFilePath to 0 in CODESYSControl.cfg