Cody Ng
Cody Ng

Reputation: 349

Azure App Service - How to set folder permission? (Window OS)

I am a newbie of Azure Cloud (App Service) (coz my clients are using it).The simple question is, how to set folder permission to writable? (as in 777 in Linux).

I need to set 3 folders to be writable:

\wwwroot\public\data
\wwwroot\public\uploads
\wwwroot\ssr-data

I don't have any idea how to do that even I did lots of searching. Some of the tutorials are old. I am using Mac OS. Does Azure Cloud still support the Remote Desktop? I prefer using this if any.

Thanks for your great helps.

Upvotes: 1

Views: 8143

Answers (2)

AjayKumar
AjayKumar

Reputation: 3163

Adding to Doris's suggestions - App Service is a PAAS solution- and it doesn't provide remote desktop access to the VM instances. The deployment mechanism is the action used to put your built application into the /home/site/wwwroot directory of your web app.

App Service supports deployment mechanisms (Kudu endpoints) and FTP and WebDeploy.

As mentioned, the app directories are available for read and write access at runtime by the app's application code.

The home directory contains an app's content, and application code can write to it. If an app runs on multiple instances, the home directory is shared among all instances so that all instances see the same directory. So, for example, if an app saves uploaded files to the home directory, those files are immediately available to all instances.

Also, although an app has full read/write access to its own temporary local storage, that storage really isn't intended to be used directly by the application code.

See this doc for more details - Operating system functionality on Azure App Service

Upvotes: 1

Doris Lv
Doris Lv

Reputation: 3398

Actually it should be writable automatically after deploying. Azure App Service is a PaaS , so it's not supported to connect to a Remote Desktop.

  1. If you really need to set the file permission, you could use the command line directly on KuDu site.

Use CMD if you are using windows environment:Icacls ${dirName} /grant ${userName}:F

Use SSH if you are using Linux environment: chmod 777 ${dirName}

  1. You could write the file content directly on KuDu site, unless you deploy from ZIP, which would lock the file to Read-Only mode.

  2. You could also choose Rest API to write file content.

Upvotes: 1

Related Questions