Folder permissions in Azure web sites

14,007

Solution 1

Folder permissions cannot be set/customized. This means whatever location your app writes to should be under your site root.

Solution 2

Your site can only write to locations under C:\DWASFiles\Sites\[siteName]\VirtualDirectory0 and to the %TEMP% folder.

Two caveats here:

  1. Stuff can't be written directly under VirtualDirectory0, you have to create a subfolder under there and place your files in that subfolder
  2. The %TEMP% folder really is temporary! If your site instance goes down for any reason and is brought back up somewhere else then everything in your %TEMP% folder will be gone. Use it only for files that really are temporary.
Share:
14,007
kenxl
Author by

kenxl

Updated on June 19, 2022

Comments

  • kenxl
    kenxl almost 2 years

    Just getting my head around the new Azure web sites feature and hitting my first obstacle. I'm deploying a PHP site which writes cache data to the file system, but the app is throwing an error because the folder it wants to write to does not have write permission. Is it possible to set permissions on folders or is this a no-no?

    I can probably work round this but would like to know if it's possible.