Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot delete wwwroot on azure

I am trying to run an NodeJs app on Azure app services for Linux. After a failed deployment I would like to delete the wwwroot folder and start from scratch, but I am not able to delete it. I have tried using ssh, bash, ftp and the Kudu REST API, but every time the result is the same.

This is the response from the DELETE call:

{"Message":"Cannot delete directory. It is either not empty or access is not allowed."}

Looks like there's an hidden .bin folder inside /node_modules that is blocking the delete operation.

enter image description here

Any hint?

like image 700
David Guida Avatar asked May 17 '26 21:05

David Guida


1 Answers

I ran into this same issue today and resolved it by deleting the following App settings from Azure; WEBSITE_RUN_FROM_ZIP and WEBSITE_RUN_FROM_PACKAGE (Both settings do the same thing, just different names).

This was following instructions in Vikas Guptas blog on 17 Aug.

Not sure if you are using VSTS (Azure devops) but it may be helpful to some people to know that using version 4 of Azure App Service Deploy automatically sets the Website_Run_From_Package flag.

like image 84
simondefreeze Avatar answered May 19 '26 12:05

simondefreeze