Share via

Exception while executing function: <Jobname> Access to the path 'C:\Program Files (x86)\SiteExtensions\Functions\4.27.5\32bit\newfolder\foldername' is denied.

rohith v 0 Reputation points
2023-11-29T10:31:34.21+00:00

Hi,

We are reporting with one of the issue in azure functions app while creating folders please find the details below.

An UnauthorizedAccessException while executing function: <jobname> Access to the path 'C:\Program Files (x86)\SiteExtensions\Functions\4.27.5\32bit<newfolder><filefolder>' is denied.

Any suggestions on the existing issue would be helpful.

Thanks.

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.


1 answer

Sort by: Most helpful
  1. Mike Urnun 9,792 Reputation points Moderator
    2023-11-30T00:16:22.53+00:00

    Hello @rohith v - Thanks for reaching out, and posting on the MS Q&A.

    Does your function app (via code) try to create the newfolder/foldername in the current directory where it is running? In the case above, were you running locally? If I misunderstand this part, kindly share more info and clarify. If correct, the error is likely caused by your app not having full read/write access to the filesystem which actually becomes reserved when running on Azure. The following doc discusses the use %SystemDrive% directory and how local storage isn't intended to be used by application code:

    I'm not sure exactly how you want to use the local filesystem but I recommend reviewing the Storage considerations for Azure Functions doc thoroughly and exploring whether services such as Azure Files and Blob Containers can be of good alternative. Hope this helps, let me know in the comments below if you have any follow-up questions.


    Please "Accept Answer" if the answer is helpful so that others in the community may benefit from your experience.

    Was this answer helpful?

    0 comments No comments

Your answer

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