Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Folder permissions in Azure web sites

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.

like image 818
kenxl Avatar asked Jun 13 '12 13:06

kenxl


2 Answers

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

like image 102
kateroh Avatar answered Oct 02 '22 00:10

kateroh


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.
like image 44
Zain Rizvi Avatar answered Oct 01 '22 23:10

Zain Rizvi