0

I have created an Azure Function (Windows - Consumption Plan). I need to copy a dylib file into the function apps bin folder.

I get a message stating The file cannot be copied onto itself.. How can I solve this ?

C:\home\site\wwwroot>copy libwkhtmltox.dylib /bin/libwkhtmltox.dylib
The file cannot be copied onto itself.
        0 file(s) copied.

enter image description here

Note: I have published this app to Azure from VS studio.

UPDATE - AFTER REMOVING WEBSITE_RUN_FROM_PACKAGE enter image description here

enter image description here

Illep
  • 16,375
  • 46
  • 171
  • 302
  • Delete the `WEBSITE_RUN_FROM_PACKAGE` configuration, or modify it to 0 and they try copying! –  Dec 07 '21 at 13:20
  • I am getting the same result. Further, the warning `Your app is currently in read only mode because you are running from a package file. To make any changes, please update the content in your zip file and WEBSITE_RUN_FROM_PACKAGE app setting.` Still appears. – Illep Dec 07 '21 at 13:44
  • @HariKrishnaRajoli-MT Further, I have published this app to Azure from Visual Studio. – Illep Dec 07 '21 at 13:45

1 Answers1

0

I get a message stating The file cannot be copied onto itself.

the warning Your app is currently in read only mode because you are running from a package file. To make any changes, please update the content in your zip file and WEBSITE_RUN_FROM_PACKAGE app setting. Still appears

For the above error I tried to deploy one function app from my VS CODE to Azure and after that i have got the similar issue if i am trying to copy files inside kudu console.

enter image description here

As per @HariKrishnaRajoli-MT suggestion , I deleted the WEBSITE_RUN_FROM_PACKAGE from configuration setting and then save and refresh and then go to Advance Tools . And run the cmd as below screenshot .

enter image description here

And it works fine here are some screenshot for reference :

enter image description here

AjayKumarGhose
  • 4,257
  • 2
  • 4
  • 15
  • For me its different. When I remove `WEBSITE_RUN_FROM_PACKAGE ` the entire content in the `wwwroot` folder gets erased except for host.json. – Illep Dec 08 '21 at 00:14
  • "Your app is currently in read only mode because you are running from a package file. To make any changes, please update the content in your zip file and `WEBSITE_RUN_FROM_PACKAGE` app setting" Is that error appears after remove above configuration . – AjayKumarGhose Dec 08 '21 at 05:25
  • The error goes away, however the content of `wwwroot` also goes away. See update post I have included screenshots. – Illep Dec 08 '21 at 06:20
  • Thanks @Illep , Could you please refer this SO THREAD: https://stackoverflow.com/questions/53630773/how-to-disable-read-only-mode-in-azure-function-app – AjayKumarGhose Dec 08 '21 at 09:20