You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/app-service/deploy-ftp.md
+33-35Lines changed: 33 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Deploy content using FTP
2
+
title: Deploy content using FTP/S
3
3
description: Learn how to deploy your app to Azure App Service using FTP or FTPS, and improve website security by disabling unencrypted FTP.
4
4
5
5
ms.assetid: ae78b410-1bc0-4d72-8fc4-ac69801247ae
@@ -9,42 +9,40 @@ author: cephalin
9
9
ms.author: cephalin
10
10
---
11
11
12
-
# Deploy your app to Azure App Service using FTP
12
+
# Deploy your app to Azure App Service using FTP/S
13
13
14
-
This article shows you how to use File Transfer Protocol (FTP) or File Transfer Protocol Secure (FTPS) to deploy your web app, mobile app backend, or API app to [Azure App Service](overview.md). No configuration is necessary to enable FTP or FTPS app deployment. The FTP endpoint for your app is already active.
15
-
16
-
FTPS is a more secure form of FTP that uses Transport Layer Security (TLS) and Secure Sockets Layer (SSL). This article uses *FTP* to indicate both forms unless otherwise specified. For more information, see [Enforce FTPS](#enforce-ftps).
14
+
This article shows you how to use File Transfer Protocol (FTP) or File Transfer Protocol Secure (FTPS) to deploy your web app, mobile app backend, or API app to [Azure App Service](overview.md). No configuration is necessary to enable FTP or FTPS app deployment. The FTP/S endpoint for your app is already active.
17
15
18
16
> [!NOTE]
19
-
> Both SCM Basic Auth Publishing Credentials and FTP Basic Auth Publishing Credentials must be enabled for FTP deployment to work. When [basic authentication is disabled](configure-basic-auth-disable.md), FTP deployment doesn't work, and you can't view or configure FTP credentials in the app's **Deployment Center**.
17
+
> Both SCM Basic Auth Publishing Credentials and FTP Basic Auth Publishing Credentials must be enabled for FTP/S deployment to work. When [basic authentication is disabled](configure-basic-auth-disable.md), FTP/S deployment doesn't work, and you can't view or configure FTP/S credentials in the app's **Deployment Center**.
20
18
21
19
## Get deployment credentials
22
20
23
-
To get credentials for deployment, follow the instructions at [Configure deployment credentials for Azure App Service](deploy-configure-credentials.md). Copy the application-scope credentials for your app, or set and copy user-scope credentials. You can connect to your app's FTP endpoint by using either set of credentials.
21
+
To get credentials for deployment, follow the instructions at [Configure deployment credentials for Azure App Service](deploy-configure-credentials.md). Copy the application-scope credentials for your app, or set and copy user-scope credentials. You can connect to your app's FTP/S endpoint by using either set of credentials.
24
22
25
-
For application-scope credentials, the FTP username format is `<app-name>\$<app-name>`. For user-scope credentials, the FTP username format is `<app-name>\<username>`. The App Service FTP endpoint is shared among apps, and because user-scope credentials aren't linked to a specific resource, you must prepend the username with the app name.
23
+
For application-scope credentials, the FTP/S username format is `<app-name>\$<app-name>`. For user-scope credentials, the FTP/S username format is `<app-name>\<username>`. App Service FTP/S endpoints are shared among apps, and because user-scope credentials aren't linked to a specific resource, you must prepend the username with the app name.
26
24
27
25
## Get the FTP endpoint
28
26
29
-
To get the FTP endpoint:
27
+
To get the FTP/S endpoint:
30
28
31
29
# [Azure portal](#tab/portal)
32
30
33
31
On the [Azure portal](https://portal.azure.com) page for your app, select **Deployment Center** under **Deployment** in the left navigation menu. On the **FTPS Credentials** tab, copy the **FTPS Endpoint** URL.
34
32
35
33
# [Azure CLI](#tab/cli)
36
34
37
-
Run the following [az webapp deployment list-publishing-profiles](/cli/azure/webapp/deployment#az-webapp-deployment-list-publishing-profiles) command, replacing the `<app-name>` and `<resource-group-name>` with your values. The following example uses a [JMESPath query](/cli/azure/query-azure-cli) to extract the FTP endpoints from the output.
35
+
Run the following [az webapp deployment list-publishing-profiles](/cli/azure/webapp/deployment#az-webapp-deployment-list-publishing-profiles) command, replacing the `<app-name>` and `<resource-group-name>` with your values. The following example uses a [JMESPath query](/cli/azure/query-azure-cli) to extract the FTP/S endpoints from the output.
Each app has two FTP endpoints, read-write and read-only. The read-only endpoint has a `profileName` containing `ReadOnly` and is for data-recovery scenarios. For FTP deployment, copy the read-write URL.
41
+
Each app has two FTP/S endpoints, read-write and read-only. The read-only endpoint has a `profileName` containing `ReadOnly` and is for data-recovery scenarios. For FTP/S deployment, copy the read-write URL.
44
42
45
43
# [Azure PowerShell](#tab/powershell)
46
44
47
-
Run the following [Get-AzWebAppPublishingProfile](/powershell/module/az.websites/get-azwebapppublishingprofile) command, replacing the `<app-name>` and `<resource-group-name>` with your values. The following example extracts the FTP endpoint from the XML output.
45
+
Run the following [Get-AzWebAppPublishingProfile](/powershell/module/az.websites/get-azwebapppublishingprofile) command, replacing the `<app-name>` and `<resource-group-name>` with your values. The following example extracts the FTP/S endpoint from the XML output.
1. From your FTP client such as [Visual Studio](https://www.visualstudio.com/vs/community/), [Cyberduck](https://cyberduck.io/), or [WinSCP](https://winscp.net/index.php), use your connection information to connect to your app.
58
+
1. From your FTP/S client such as [Visual Studio](https://www.visualstudio.com/vs/community/), [Cyberduck](https://cyberduck.io/), or [WinSCP](https://winscp.net/index.php), use your connection information to connect to your app.
61
59
1. Copy your files and their directory structure to the [/site/wwwroot](https://github.com/projectkudu/kudu/wiki/File-structure-on-azure) directory in Azure or the */site/wwwroot/App_Data/Jobs/* directory for WebJobs.
62
60
1. Browse to your app's URL to verify the app is running properly.
63
61
64
62
> [!NOTE]
65
-
> Unlike [local Git deployment](deploy-local-git.md) and [ZIP deployment](deploy-zip.md), FTP deployment doesn't support build automation such as:
63
+
> Unlike [local Git deployment](deploy-local-git.md) and [ZIP deployment](deploy-zip.md), FTP/S deployment doesn't support build automation such as:
66
64
> - Restoring dependencies like NuGet, NPM, PIP, and Composer automation.
67
65
> - Compiling .NET binaries.
68
66
> - Generating a *web.config* file.
@@ -71,7 +69,7 @@ To deploy files to Azure with FTP:
71
69
72
70
## Enforce FTPS
73
71
74
-
For enhanced security, you should enforce FTPS over TLS/SSL only. You can also disable both FTP and FTPS if you don't use FTP deployment.
72
+
FTPS is a more secure form of FTP that uses Transport Layer Security (TLS) and Secure Sockets Layer (SSL). For enhanced security, you should enforce FTPS over TLS/SSL. You can also disable both FTP and FTPS if you don't use FTP deployment.
75
73
76
74
To disable unencrypted FTP:
77
75
@@ -81,7 +79,7 @@ To disable unencrypted FTP:
81
79
82
80
1. On the **General settings** tab of the **Configuration** page, under **Platform settings**, select **FTPS only** for **FTP state**. Or to disable both FTP and FTPS entirely, select **Disabled**.
83
81
84
-

82
+
[](./media/app-service-deploy-ftp/disable-ftp.png#lightbox)
85
83
86
84
1. If you select **FTPS only**, be sure TLS 1.2 or higher is enforced for **Minimum Inbound TLS Settings**. TLS 1.0 and 1.1 aren't supported for **FTPS only**.
-[How can I connect to FTP in App Service via passive mode?](#how-can-i-connect-to-ftp-in-azure-app-service-via-passive-mode)
108
+
-[How can I connect to FTP/S in App Service via passive mode?](#how-can-i-connect-to-ftps-in-azure-app-service-via-passive-mode)
111
109
-[How can I determine what method was used to deploy my app?](#how-can-i-determine-what-method-was-used-to-deploy-my-app)
112
110
-[What can happen to my app during deployment?](#what-can-happen-to-my-app-during-deployment)
113
-
-[What's the first step in troubleshooting FTP deployment?](#whats-the-first-step-in-troubleshooting-ftp-deployment)
114
-
-[Why can't I FTP and publish my code?](#why-cant-i-ftp-and-publish-my-code)
111
+
-[What's the first step in troubleshooting FTP/S deployment?](#whats-the-first-step-in-troubleshooting-ftps-deployment)
112
+
-[Why can't I FTP/S and publish my code?](#why-cant-i-ftps-and-publish-my-code)
115
113
-[Why does my connection fail when attempting to connect over FTPS using explicit encryption?](#why-does-my-connection-fail-when-attempting-to-connect-over-ftps-using-explicit-encryption)
116
114
117
-
### How can I connect to FTP in Azure App Service via passive mode?
115
+
### How can I connect to FTP/S in Azure App Service via passive mode?
118
116
119
117
Azure App Service supports connecting via both active and passive modes. Passive mode is preferred because deployment machines are usually behind a firewall in the operating system or as part of a home or business network. For an example of a passive mode connection, see [The Connection Page (Advanced Site Settings dialog)](https://winscp.net/docs/ui_login_connection).
120
118
121
119
### How can I determine what method was used to deploy my app?
122
120
123
121
You can find out how an app was deployed by checking the application settings under **Settings** > **Environmental variables** in the Azure portal. Select the **App settings** tab.
124
122
125
-
- If the app was deployed using an external package URL, you see the `WEBSITE_RUN_FROM_PACKAGE` setting in the application settings with a URL value.
126
-
- If the app was deployed using ZIP deploy, you see the `WEBSITE_RUN_FROM_PACKAGE` setting with a value of `1`.
123
+
- If the app was deployed using an external package URLthe `WEBSITE_RUN_FROM_PACKAGE` setting appears in the application settings with a URL value.
124
+
- If the app was deployed using ZIP deploy, the `WEBSITE_RUN_FROM_PACKAGE` setting appears with a value of `1`.
127
125
128
126
If the app was deployed using Azure DevOps, you can see the deployment history in the Azure DevOps portal. If Azure Functions Core Tools was used, you can see the deployment history in the Azure portal.
[!INCLUDE [What can happen to my app during deployment?](../../includes/app-service-deploy-atomicity.md)]
132
130
133
-
### What's the first step in troubleshooting FTP deployment?
131
+
### What's the first step in troubleshooting FTP/S deployment?
134
132
135
-
The first step for troubleshooting FTP deployment is distinguishing between deployment issues and runtime application issues.
133
+
The first step for troubleshooting FTP/S deployment is distinguishing between deployment issues and runtime application issues.
136
134
137
-
- A deployment issue typically results in no files or wrong files deployed to your app. You can troubleshoot by investigating your FTP deployment or selecting an alternate deployment path, such as source control.
135
+
- A deployment issue typically results in no files or wrong files deployed to your app. You can troubleshoot by investigating your FTP/S deployment or selecting an alternate deployment path, such as source control.
138
136
139
137
- A runtime application issue typically results in the right files deployed to your app but incorrect app behavior. You can troubleshoot by focusing on code behavior at runtime and investigating specific failure paths.
140
138
141
139
For more information, see [Deployment vs. runtime issues](https://github.com/projectkudu/kudu/wiki/Deployment-vs-runtime-issues).
142
140
143
141
### Why can't I FTP and publish my code?
144
142
145
-
Check that you entered the correct [hostname](#get-ftp-endpoint) and [credentials](#get-deployment-credentials). Check also that the following FTP ports on your machine aren't blocked by a firewall:
143
+
Check that you entered the correct [hostname](#get-ftp-endpoint) and [credentials](#get-deployment-credentials). Check also that the following FTP/S ports on your machine aren't blocked by a firewall:
146
144
147
-
- FTP control connection port: 21, 990
148
-
- FTP data connection port: 989, 10001-10300
145
+
- FTP/S control connection port: 21, 990
146
+
- FTP/S data connection port: 989, 10001-10300
149
147
150
148
### Why does my connection fail when attempting to connect over FTPS using explicit encryption?
151
149
152
-
FTPS allows establishing an Explicit or Implicit TLS secure connection.
150
+
FTPS allows establishing an explicit or implicit TLS secure connection.
153
151
154
-
- If you connect with Explicit encryption, the connection is established via port 21.
155
-
- If you connect with Implicit encryption, the connection is established via port 990.
152
+
- If you connect with explicit encryption, the connection is established via port **21**.
153
+
- If you connect with implicit encryption, the connection is established via port **990**.
156
154
157
-
The URL format you use can affect your connection success, depending on your client application. The portal might show the URL as `ftps://`, but if the URL you connect with starts with `ftp://`, the connection is implied to be on port 21. If the URL starts with `ftps://`, the connection is implied to be Implicit and on port 990.
155
+
The URL format you use can affect your connection success, depending on your client application. The portal might show the URL as `ftps://`, but if the URL you connect with starts with `ftp://`, the connection is implied to be on port **21**. If the URL starts with `ftps://`, the connection is implied to be implicit and on port **990**.
158
156
159
-
Make sure not to mix the settings, such as attempting to connect to `ftps://` by using port 21. This setting fails to connect even by using Explicit encryption, because an Explicit connection starts as a plain FTP connection before the `AUTH` method.
157
+
Make sure not to mix the settings, such as attempting to connect to `ftps://` by using port **21**. This setting fails to connect even by using explicit encryption, because an explicit connection starts as a plain FTP connection before the `AUTH` method.
0 commit comments