azureubuntuazure-web-app-service.net-5puppeteer-sharp

Published .net Core Azure app service (Linux) doesn't have permission


I have a problem with downloading or executing 'puppeteer-sharp' related files in my Linux web app service. It works on local machine, which means it downloads the last version of Chrome and runs it successfully.

My app is a .net core 5 web app which named 'Web'. Main dll (Web.dll) runs under root user with -rw-r--r-- permission automatically after git push and I can't change the permission with ssh:

chmod: changing permissions of 'Web.dll': Read-only system

Exception message in software is exactly error message in SSH after chmod command:

System.IO.IOException: Read-only file system   
at System.IO.FileSystem.CreateDirectory(String fullPath)   
at PuppeteerSharp.BrowserFetcher.DownloadAsync(String revision)

It has been published with azure CI/CI and disk layout is normal, I mean app service storage.

Run command from Azure app service log stream:

docker run -d -p 5420:8080 --name projectname 
-e WEBSITE_SITE_NAME=projectname -e WEBSITE_AUTH_ENABLED=False 
-e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=projectname.azurewebsites.net 
-e WEBSITE_INSTANCE_ID=xxxx -e HTTP_LOGGING_ENABLED=1 
appsvc/dotnetcore:5.0_20210607.3 dotnet Web.dll 

SSh:

SSH


Solution

  • I found the answer after 1 day search.

    Remove the WEBSITE_RUN_FROM_PACKAGE from Azure app service "Application settings"