How to fix '/home/LogFiles/Application/Functions/Host' Azure function

Minh Pham | Ximius 5 Reputation points
2024-05-27T09:24:45.7766667+00:00

The set up we have: Azure function app, we have queue trigger in the azure function and we set up our function using teraform template.

The function will not discover the functions or anything.

But if we change the azure AzureWebJobsStorage to the connection it gives the following errors: System.Private.CoreLib: Access to the path '/home/LogFiles/Application/Functions/Host' is denied. Permission denied.

Does anyone know why this happens?

Also, we want to know why the managed identity is not working?

Thank you!

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,198 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. LeelaRajeshSayana-MSFT 16,701 Reputation points
    2024-05-28T18:36:51.6866667+00:00

    Hi @Minh Pham | Ximius Greetings! Thank you for posting the question here.

    The app setting AzureWebJobsStorage Specifies the connection string for an Azure Storage account that the Functions runtime uses for normal operations. Some uses of this storage account by Functions include key management, timer trigger management, and Event Hubs checkpoints. The error message indicates that you are trying to use a local storage end point which might be hosted in the path /home/LogFiles/Application/Functions/Host and the function app cannot access the path. Can you please confirm if you are trying to use a local storage account?

    Also, we want to know why the managed identity is not working?

    If you are planning to access storage account using Managed identity, you will need to create a role assignment that provides access to the storage account for AzureWebJobsStorage at runtime. Management roles like Owner are not sufficient. The Storage Blob Data Owner role covers the basic needs of Functions host storage - the runtime needs both read and write access to blobs and the ability to create containers. Please refer to the article - Connecting to host storage with an identity for more information on this.

    Let us know if this helps.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.