Triage and Remediation
Remediation
Using Console
Using Console
To remediate the misconfiguration of disabling plain FTP deployment in AZURE, please follow the below steps:
- Log in to the AZURE portal (https://portal.azure.com/).
- Select the App Service that you want to remediate.
- Click on the “Deployment Center” option from the left-hand side menu.
- Select the “FTP” option under the “Deployment method” section.
- Click on the “FTP Access” option.
- In the “FTP Access” window, select the “FTP” option and click on the “Save” button.
- Now, select the “FTP/S (SSL)” option and click on the “Save” button.
- Click on the “Save” button in the “Deployment Center” window to save the changes.
- Now, plain FTP deployment is disabled, and only secure FTP/S (SSL) is enabled for the selected App Service.
Using CLI
Using CLI
To remediate the misconfiguration of disabling plain FTP deployment in Azure using Azure CLI, you can follow the below steps:Step 1: Open Azure CLI and login to your Azure account using the command:Step 2: Once you have logged in, you need to select the subscription that contains the App Service where you want to disable plain FTP deployment using the command:Replace the Replace This command will return the current state of the FTPS (FTP over SSL) deployment for your App Service. If it returns “Disabled”, then plain FTP deployment has been successfully disabled.That’s it! You have now remediated the misconfiguration of disabling plain FTP deployment in Azure using Azure CLI.
<subscription-id>
with the actual ID of your subscription.Step 3: Next, you need to set the configuration of your App Service to disable plain FTP deployment. To do this, use the following command:<app-name>
with the name of your App Service and <resource-group-name>
with the name of the resource group where your App Service is located.Step 4: Finally, verify that plain FTP deployment has been disabled by running the following command:Using Python
Using Python
To remediate the misconfiguration of disabling plain FTP deployment in Azure using Python, you can follow these steps:
- Connect to the Azure Subscription using the Azure Python SDK.
-
Replace the
TENANT_ID
,CLIENT_ID
,CLIENT_SECRET
,SUBSCRIPTION_ID
,RESOURCE_GROUP_NAME
, andWEB_APP_NAME
variables with your own values. - Run the script to disable plain FTP deployment in Azure for the specified Web App.