kenxl
kenxl

Reputation: 319

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.

Upvotes: 6

Views: 15152

Answers (4)

steenhulthin
steenhulthin

Reputation: 4773

It should be possible using webdeploy.

However I don't think there is a way do it without manually setting up the webdeploy package - as described in the post http://blogs.msdn.com/b/azureappgallery/archive/2013/04/03/set-file-folder-permissions-for-your-content-on-azure-website-using-web-deployable-package.aspx.

Upvotes: 0

Zain Rizvi
Zain Rizvi

Reputation: 24636

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.

Upvotes: 1

kateroh
kateroh

Reputation: 4416

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

Upvotes: 3

mcollier
mcollier

Reputation: 3719

Is the folder that the app is trying to write to under the site's folder?

It's my understanding that folder permissions cannot be set/changed. But I haven't seen anything from Microsoft that definitively says "yes" or "no" to that.

Upvotes: 0

Related Questions