Change Folder Permissions Azure Web App Windows

Mark Perry 1 Reputation point
2022-03-07T15:48:07.887+00:00

We have an ASP.NET Web forms app running on Azure. We need to be able to set a folder in the App_Data to read /write. How do we do that?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,006 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 49,246 Reputation points
    2022-03-07T16:09:21.497+00:00

    The app should already have read/write permissions to App_Data. That is where it is recommended that app data be stored. I'm assuming that you are seeing errors when trying to write to this folder so something got messed up. One cause of this is if your App_Data folder is empty when you publish. If it is then the folder won't be created and therefore you won't have write access.

    However I've also seen blog articles indicating that in Azure your app has full write access to the entire structure under it which is different than a traditional IIS. But users don't have write permissions. So provided you're running your app is running as a typical web app it should just work.


  2. ajkuma 22,851 Reputation points Microsoft Employee
    2022-03-15T11:50:22.7+00:00

    MarkPerry-2511, Just adding additional information:

    All Azure Web Apps (as well as Mobile App/Services, WebJobs and Functions) run in a secure environment called a sandbox.

    Every Azure Web App has a home directory stored/backed by Azure Storage. This network share is where applications store their content.
    --This directory is available for the sandbox with read/write access.

    As a convenience for our customers, the sandbox implements a dynamic symbolic link in kernel mode which maps d:\home to the customer home directory.

    Applications can read the system drive as controlled by ACLs on the drive. Applications cannot write to any location on the system drive, as implemented in the sandbox (i.e. even if ACLs allowed writing to a location on system drive, the sandbox would restrict it).

    Please check these docs:
    Azure Web App sandbox | File System Restrictions/Considerations
    Operating system functionality on Azure App Service

    0 comments No comments