How to manually create a directory on your Azure App Service
There are 3 kinds of files that an Azure App Service can deal with:
- Persisted Files
- Temporary Files
- Machine Level read-only files
What does those mean and what can they be used for?
These files are rooted in the D:\home path. The contents of these files are shared between all the multiple instances of your App Services. Information about the file structure under the D:\home directory can be found here which is replicated in Figure 1.
Figure 1, directory structure of the persisted files of an Azure App Service
- D:\home\data\jobs is the location where your WebJobs would be store, I discuss some about WebJobs here:
- D:\home\LogFiles is the location where numerous logfiles are written, for example:
- Web Server Logging (http or IIS logs)
- Detailed Error Messages
- Failed Request Tracing, which I discuss here, Enable Failed Request Tracing for an Azure App Service Web App
- Eventlog.xml file, which I discuss here
- Kudu traces, which contain deployment and WebJob logs, which I discuss here
- D:\home\site\wwwroot is the location where you site source code exists
NOTE: the files stored in the D:\home are accessible from all instances of your App Service Plan, which I describe here. If the ASP is running in Standard mode, you can have up to 10 instances, 20 in Premium mode, for example, all of which would read/write to the same shared location.
To create a directory using a tool like FIleZilla, right-click on the folder you want to put the new folder into, and select Create Directory, as seen in Figure 2.
Figure 2, how to create a directory, folder on an Azure App Service
These files, stored in the D:\Local are accessible only from the individual instance of the App Service Plan. You can look over the file system structure using KUDU/SCM which I describe here. You can see the partial structure in Figure 3.
Figure 2, the temporary file structure of an Azure App Service, how to create a directory, folder on an Azure App Service
Also notice that you can create a new folder or new file. I would recommend you navigate to the D:\Local\Temp directory to create it, just to keep things cleaner.
NOTE: if you scale down or an auto heal happens, described here, and the VM running the app is removed from service, the contents in this location will be gone as well. Only write things into this location which are actually temporary. If you are running only on single instance, than it is a little more simplified.
Machine Level read-only files
The Azure App Service is able to access standard Windows locations like %ProgramFiles% and %windir% but can never be modified. Some more information about this topic can be found here.