access denied (java.io.FilePermission" "<>" "execute")

abhi97660
abhi97660 New Altair Community Member
edited November 2024 in Community Q&A

Hello,

I am using windows os and using rapidminer 8.2

I am developing an extension in which I am trying to execute a command eg:

ffmpeg -i small.mp4

  from the java code

I have tried using

  1. Runtime.getRuntime().exec("cmd /c ffmpeg -i abc.mp4")
  2.  I have tried using process builder for the same

 but still I am getting the same error as shown in  attachment .

I have tried similar approach in simple java class program inside void main function and both the points mentioned above are working fine.

But when I tried using above mentioned points inside rapiminer extension and  I am getting the error.

I also tried using simple commands like "dir" still similar error.

I went to this Link before posting but didn't find any solution regarding this.

can anyone please provide suggestions regarding this?

Tagged:

Best Answer

  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Answer ✓

    Hi,

     

    yes it does, because it's an operator built into Studio Core. With it, a user can do whatever he likes, but he has to enter the command himself.

    An extension however could just execute any arbitrary command without the user even knowing, which is why the restriction exists.

     

    Regards,

    Marco

Answers

  • Marco_Boeck
    Marco_Boeck New Altair Community Member

    Hi,

     

    this is a security mechanism by RapidMiner Studio to prevent extensions from doing potentially malicious things. See https://docs.rapidminer.com/latest/developers/security/ for more details.

     

    Regards,

    Marco

  • abhi97660
    abhi97660 New Altair Community Member

    Thanks for sharing the link I went through it.

    Also the operator called Execute Program seems to execute these commands,

    does that operator have special permissions ?

  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Answer ✓

    Hi,

     

    yes it does, because it's an operator built into Studio Core. With it, a user can do whatever he likes, but he has to enter the command himself.

    An extension however could just execute any arbitrary command without the user even knowing, which is why the restriction exists.

     

    Regards,

    Marco

  • abhi97660
    abhi97660 New Altair Community Member

    Thank you for the suggestion my doubts regarding this are cleared.