An Azure service that provides an event-driven serverless compute platform.
Hello John Hynes,
It looks like your Function App on Linux can’t start because the host is trying to execute your function binary (/home/site/wwwroot/MyFunction) but it doesn’t have the “x” bit set—and since you’re on a Flex Consumption (Linux) plan with run-from-package enabled, you can’t just jump into Kudu and chmod it (the file system is read-only when run-from-package is on, and your app isn’t running so the normal Kudu UI/API isn’t available).
Here’s how to get unstuck:
- Confirm whether you’re running from package • In the Azure Portal go to Configuration > Application settings and look for
WEBSITE_RUN_FROM_PACKAGE. • If it’s set to “1” (or you see a ZIP URL in that setting), the app content is mounted read-only. - If you are run-from-package, you must set the execute bit before zipping and deploying a. On a Linux or WSL box, in your function project folder run: •
chmod +x MyFunction(or whatever your handler binary is called) b. Recreate your ZIP so it preserves Unix permissions: •zip -r --symlinks functionapp.zip *c. Deploy with ZIP deploy (this ensures the package you build is exactly what lands on the host): •func azure functionapp publish <YourAppName> --zip path/to/functionapp.zipThat way the mounted package already has the correct exec bit and the Functions host can start it. - If you’d rather tweak permissions on the server side, you can temporarily disable run-from-package a. Set
WEBSITE_RUN_FROM_PACKAGEto0(or remove it), save and let a redeploy extract files to a writeablewwwroot. b. Once the app is up you can use the Portal’s SSH (under Development Tools) or the Kudu Debug Console to runchmod +x MyFunction. c. Re-enable run-from-package if you want the performance/consistency benefits of mounted packages. - Double-check your startup command (if you’ve overridden it) • If you’re using a custom handler, make sure your
customHandler.jsonpoints to the correct executable and that it’s located inwwwrootwith exec permissions.
Hope that helps get your Linux function back online! If it still fails, let us know:
• Are you using a custom handler or a built-in runtime (C#, Node, etc.)?
• How are you publishing (ZIP deploy, VS publish profile, CI/CD)?
• What do you have set for WEBSITE_RUN_FROM_PACKAGE and any custom startup command?
—Reference—
• Adding/Creating functions from source control (run-from-package makes wwwroot read-only)
https://learn.microsoft.com/azure/azure-functions/run-functions-from-deployment-package
• SSH into your Linux Function App (bypasses Kudu when app isn’t running)
https://learn.microsoft.com/azure/app-service/configure-language-python#ssh-support
• Permission Denied Error in App Service (exec-bit reminders and allowed paths)
Note: This content was drafted with the help of an AI system. Please verify the information before relying on it for decision-making.
Please accept as answer and do a Thumbs-up to upvote this response if you are satisfied with the community help. Your upvote will be beneficial for the community users facing similar issues.