AZURE WWWROOT cant delete files to do upgrade get access denied

Kenneth Echevarria 0 Reputation points
2024-05-25T02:53:00.29+00:00

I'm using my SFTP credentials but cant delete half of the files in the root folder to do an upgrade. Get access denied.

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,302 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Nehruji R 8,146 Reputation points Microsoft Vendor
    2024-05-27T12:58:54.86+00:00

    Hello Kenneth Echevarria ,

    Greetings! Welcome to Microsoft Q&A Platform.

    I understand that you’re encountering an issue with SFTP permissions while trying to delete files in the root folder.

    Are you using an Azure File? If so, Azure Files doesn’t support SFTP. Make sure you’re using the appropriate method for file management.

    If you’re using Azure App Services, consider other approaches for deployment and file management.

    Hidden Folders and Permissions: Sometimes, hidden folders or files (such as .bin folders inside /node modules) can prevent deletion. Ensure that there are no hidden files or directories blocking the operation.

    Verify that you have the necessary permissions to delete files. Access denied errors often occur due to insufficient permissions.

    App Settings in Azure: Check your Azure App Service settings. Specifically, look for the following App settings:

    WEBSITE_RUN_FROM_ZIP

    WEBSITE_RUN_FROM_PACKAGE

    These settings can affect the read-only status of the wwwroot folder. If they are set to enforce read-only mode, you won’t be able to delete files.

    Try changing the value of WEBSITE_RUN_FROM_PACKAGE from 1 to 0. This might allow you to delete the files.

    Stop the Web App: Before attempting to delete files, stop the Azure Web App (either through the Azure Portal or CLI). Then, access Kudu (Azure’s deployment engine) and delete the node_modules folder from there. Sometimes, stopping the app first helps unblock file operations.

    Rename or Move Files: If you encounter a file in a weird state, try renaming or moving it to a different location. This might unblock the deletion process.

    Hope this answer helps! Please let us know if you have any further queries. I’m happy to assist you further.


    Please "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.