Can't get access to C:\ from Function App Debug Console

Shivam Saxena 1 Reputation point
2020-12-19T21:44:08.573+00:00

Hey guys, I'm trying to run an EXE using Azure Functions, however, the EXE has a dependency to the path "C:\my-path-min".

How do I access the C:\ drive to make this directory using the SCM Debug console? I tried to use the PowerShell option in the Debug console and "cd" into the C:\ drive, then use mkdir to create the directory, but I get the following error

  • CategoryInfo : PermissionDenied: (C:\mypath:String) [New-Item],
    UnauthorizedAccessException
    • FullyQualifiedErrorId : CreateDirectoryUnauthorizedAccessError,Microsoft
      .PowerShell.Commands.NewItemCommand

so my questions are:

  1. How do I create a directory to the path at "C:\my-path-min"
  2. How do I upload files into the directory created at (1)? This is very easy to do if the directory is in the default D:\ drive, since you can use the Debug Console to just drag and drop. But how can this be done when the target directory is in the C:\ drive?

Thanks!

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

1 answer

Sort by: Most helpful
  1. JayaC-MSFT 5,526 Reputation points
    2020-12-24T09:11:46.7+00:00

    Hello @Shivam Saxena In case of App Services C:\ drive is for app-specific temporary local storage and that storage isn't intended to be used directly by the application code. Please refer to the official documentation :
    https://learn.microsoft.com/en-us/azure/app-service/operating-system-functionality#types-of-file-access-granted-to-an-app

    https://learn.microsoft.com/en-us/azure/app-service/operating-system-functionality#local-drives

    Does this help?

    1 person found this answer helpful.