azure-functions-core-tools icon indicating copy to clipboard operation
azure-functions-core-tools copied to clipboard

Publishing a funciton strips permissions from executable

Open jcstorms1 opened this issue 8 months ago • 0 comments

Version

4.0.7030

Description

Up until recently we have been able to publish a function that contained a Datadog executable binary packaged in a nuget package. This no longer works with a local build.

After running func azure functionapp publish AppName --dotnet-isolated --dotnet-version 8.0, the file is executable in /bin/publish/datadog-serverless-agent-linux-amd64

  • -rwxr--r-- 1 jordan.storms 2629592 Jan 28 13:44 datadog-serverless-trace-mini-agent.

However, the permissions are altered in the function app.

  • -rw-rw-rw- 1 nobody nogroup 2629592 Jan 28 13:44 datadog-serverless-trace-mini-agent.

I'm not sure if something changed in the latest release of the function tools, but it is not clear what is causing the permissions to be stripped from the executable. I have been using the same command to publish my functions for months without issue. It is worth noting that this does not happen with a remote build, but a remote build will not allow us to test local packages we are developing.

Steps to reproduce

Add the Datadog SMA package as a dependency and deploy to an EP host using the command func azure functionapp publish AppName --dotnet-isolated --dotnet-version 8.0

jcstorms1 avatar Apr 24 '25 14:04 jcstorms1