FILE_OPERATION_DENIED

fleaplc
2023-09-25
2023-11-07
  • fleaplc

    fleaplc - 2023-09-25

    By using the CAA FILE library (FB FILE.Open) (raspberry pi, codesys 3.5.19.0) I always get the error FILE_OPERATION_DENIED
    The file exist, it has r/w/x access and path is correct...
    Some idea to fix it?

     
  • eschwellinger

    eschwellinger - 2023-09-25

    due security reason files could only be accessed in /var/opt/codesys/PlcLogic directory

     
  • auwallle - 2023-09-26

    Hi @eschwellinger Is this new with SP19? Or Hardware based?

     
  • eschwellinger

    eschwellinger - 2023-09-26

    security related..since SP19 not hardware based

     
  • hki75 - 2023-09-27

    mmm.. I moved my file to /var/opt/codesys/PlcLogic directory but I still getting FILE_OPERATION_DENIED.. Did I miss something? file rights are 0755

     

    Last edit: hki75 2023-09-27
  • fleaplc

    fleaplc - 2023-09-30

    /var/opt/codesys/PlcLogic not work here, again FILE_OPERATION_DENIED. May I simply moved my files in /var/opt/codesys/PlcLogic or need some particular settings?

     

    Last edit: fleaplc 2023-09-30
  • sean-barton - 2023-10-13

    I have code written since version 3.5.16 to access the USB drive, how can I do that now the file access has been taken away?

    I have tried adding a sybolic link to the usb drive in the following directories:
    /var/opt/codesys/PlcLogic/
    /var/opt/CODESYS/PlcLogic/
    /opt/CODESYS/PlcLogic/

    I still recieve a "FILE_OPERATION_DENIED" response when accessing the USB drive.

     

    Last edit: sean-barton 2023-10-13
  • chris12345 - 2023-10-17

    Hello everyone,
    I am using SP19 patch 2 on a Kunbus device with runtime package 4.9.0.0. I am having the same problem as mentioned above. With the FB File.open I get the FILE_OPERATION_DENIED error. I have also tried the path /var/opt/codesys/PlcLogic. Any advice?
    Chris

     
  • i-campbell

    i-campbell - 2023-10-17

    in your project, to access /var/opt/codesys/PlcLogic/my.file, use the string 'my.file' or '$$PlcLogic$$/my.file'

     
    πŸ‘
    2
    • chris12345 - 2023-10-17

      Thank you

       
    • sean-barton - 2023-11-07

      Worked for me, thanks!

       

Log in to post a comment.