0

Is it possible to execute binaries in a consumption-based function app? The app files are read only in consumption-based apps, so once it is deployed I get an access denied when trying to execute from /home/site/wwwroot/

When I deploy my files to Azure, I have an executable in /home/site/wwwroot/bin, but access is denied when trying to execute from this location. I found out the app files are read-only in consumption-based plans and was wondering if this is possible. I don’t want to have to copy the executable into /tmp/ every time the function executes.

2
  • Is the machine IIS? IIS is secure and does not allow running executables unless account is ADMIN, It is not recommended to allow executables to run due to hackers getting access to the file. Commented Feb 11 at 22:39
  • @jdweng It looks possible in an ASP.NET app running in an App Service that's for sure; but I don't know if the Azure Functions runtime is different from an ASP.NET. Reference: learn.microsoft.com/en-us/azure/app-service/… Commented Feb 11 at 23:07

1 Answer 1

0

Is it possible? Yes. However, putting aside the fact that copying a binary poses a security risk, you should not be storing anything inside the /tmp/ folder. As the name suggests, it is a temporary folder and is not persistent storage. It gets cleared on a reboot

So, the potential workarounds are:

  1. Containerize the function app. You can create a custom container and deploy your function inside that, giving you full control over the runtime environment

  2. Continue to copy the binary to /tmp/

  3. Use a premium or dedicated plan instead of consumption plan. The filesystem for these plans are writable and persistent.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.