Azure-functions-core-tools: Azure Functions 2.7.2100-1, func azure functionapp publish fails with Error: Permission denied

Created on 4 Feb 2020  路  18Comments  路  Source: Azure/azure-functions-core-tools

Azure functions fails to publish with version 2.7.2100-1

Issue occurred in Azure Devops pipeline at 5pm PST on 2/3/2020

Reproduced error locally.

Current fix is to role back to 2.7.1948-1

Output

With version 2.7.2100-1

Selecting previously unselected package azure-functions-core-tools.
Preparing to unpack .../azure-functions-core-tools_2.7.2100-1_amd64.deb ...
Unpacking azure-functions-core-tools (2.7.2100-1) ...
Setting up dotnet-runtime-deps-2.1 (2.1.15-1) ...
Setting up azure-functions-core-tools (2.7.2100-1) ...

Telemetry
---------
The Azure Functions Core tools collect usage data in order to help us improve your experience.
The data is anonymous and doesn't include any user specific or personal information. The data is collected by Microsoft.

You can opt-out of telemetry by setting the FUNCTIONS_CORE_TOOLS_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

~/work/1/s/<HIDDEN> ~/work/1/s
Getting site publishing info...
Skipping build event for functions project (--no-build).
Permission denied

With version 2.7.1948-1:

Selecting previously unselected package azure-functions-core-tools.
Preparing to unpack .../azure-functions-core-tools_2.7.1948-1_amd64.deb ...
Unpacking azure-functions-core-tools (2.7.1948-1) ...
Setting up dotnet-runtime-deps-2.1 (2.1.15-1) ...
Setting up azure-functions-core-tools (2.7.1948-1) ...

Telemetry
---------
The Azure Functions Core tools collect usage data in order to help us improve your experience.
The data is anonymous and doesn't include any user specific or personal information. The data is collected by Microsoft.

You can opt-out of telemetry by setting the FUNCTIONS_CORE_TOOLS_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

~/work/1/s/<HIDDEN> ~/work/1/s
Getting site publishing info...
Skipping build event for functions project (--no-build).
Uploading package...
Uploading 164.4 MB []Upload completed successfully.
Deployment completed successfully.

Additional information

  • AzDo Linux build agent
  • Service Principal authentication via AZ CLI

NOTE: 2.7.2100-1 is the current default version on apt

Needs

Most helpful comment

@ankitkumarr this should probably be reopened. The apt package provided by the Microsoft apt Repo still has the wrong version. Microsoft is in control of this repo and it is a major blocker for our customers. I understand the latest version has a fix but the current apt version on azure cloud shell and azure devops build agents is not the latest.

All 18 comments

Hi, we are taking a look and will have a fix released as soon as we can.

In the meanwhile, you can mitigate by running chmod a+x /usr/lib/azure-functions-core-tools/gozip

gozip is an executable that is used and the permission denied error comes from it not have executable permissions. Manually adding that can fix your setup. We will release a new package with the right fix. Thanks!

I am seeing a similar issue on version 3.0.2106 on Mac Osx

@bobjac, can you try reinstalling core-tool? We fixed the install script, and are in process of releasing a new version. In the meanwhile, re installs in old version for Mac package should also work.

This is now resolved in a new version of azure-functions-core-tools.

This is now resolved in a new version of azure-functions-core-tools.

@ankitkumarr when can we expect a new release w/ the fix?

@brandonh-msft, this is already released - 2.7.2184 (https://github.com/Azure/azure-functions-core-tools/releases/tag/2.7.2184)

Is this released to cloudshell? I am getting error while creating archive for current directory...

@brandonh-msft, this is already released - 2.7.2184 (https://github.com/Azure/azure-functions-core-tools/releases/tag/2.7.2184)

right, but note the comment about this being broken in 3.0.2106 as well - has the 3.x version been fixed? I had to roll back to 3.0.2009 to func publish my v3 function app

Is there a workaround if doing the azure developer courses? Azure Cloud Shell is reporting permission denied when trying to create archive for current directory.

Also faced this issue in the Microsoft Learning Cloud Shell sandbox while attempting to follow the Azure Development course.

Is there an update on this fix in Cloud Shell - have a production customer trying to perform an update of their function apps and getting blocked on this. They perceive this as a stability issue and are considering moving from function apps back to lambda.

@ankitkumarr this should probably be reopened. The apt package provided by the Microsoft apt Repo still has the wrong version. Microsoft is in control of this repo and it is a major blocker for our customers. I understand the latest version has a fix but the current apt version on azure cloud shell and azure devops build agents is not the latest.

@brandonh-msft, yes it should be fixed for v3 as well. If you re-install the core-tools, it should work.

@rodbutters, sorry this took a while to be fixed in Cloud Shell as they have a different release schedule. I just checked and cloud shell is updated with the proper fix. Hope this resolves it,

@mattpasco-microsoft, we did indeed update the linux packages last week when we release the fix. I verified it by installing from apt, and it worked as expected. Are you not seeing the latest release 2.7.2184 there?

This should be resolved everywhere now. Please let us know if you are still continuing to see this.

@ankitkumarr looks like the azure function version in cloud shell is now 2.7.2184 2 days ago it was still 2.7.2100 seems good to close to me.

@brandonh-msft, yes it should be fixed for v3 as well. If you re-install the core-tools, it should work.

@ankitkumarr,
nope

~
Getting site publishing info...
Creating archive for current directory...
Creating archive for current directory...
Creating archive for current directory...
Permission denied
~

This is in a devcontainer pulling 3.0.2106 via zip-download (not apt-get because it's not yet been published to apt). I was pulling 3.0.2009 and changed to 2106 just now to re-download and test. 2009 works fine with the same d/l & install method.

@brandonh-msft, is this an official dev container? Could you show me where you are downloading from? Once you download, if you add an executable bit to gozip (as shown in earlier comments), the error should go away for now.

Additionally, we published v3 core-tools in apt-get as azure-functions-core-tools-3. The documentation update will follow, but sharing here to unblock you.

I've forked this to #1850

Closing this, as original issue is resolved and the we are continuing the conversation in the forked issue Brandon created.

Was this page helpful?
0 / 5 - 0 ratings