azure - 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:
解决方案
经过1天的搜索,我找到了答案。
从 Azure 应用服务“应用程序设置”中删除WEBSITE_RUN_FROM_PACKAGE
推荐阅读
- sql - SQL Server 中的修剪
- javascript - 我将如何将下降的动画保持在最后一帧?
- java - 为适用于 Android 的 Amazon AWS SES 发送带附件的电子邮件?
- c# - IHostedService 的多种实现
- javascript - 既然数据 URL 似乎已被弃用,那么在浏览器中生成 SVG 文件?
- c# - 以 5 个一组的方式遍历数据库记录以使用 iTextSharp 填充 AcroFields
- android - Android Studio 编辑器自动完成
- webview - Webview vscode 扩展中的奇怪缓存
- mysql - 在父 MySQL 之前删除子
- react-native - RNRF - 升级到最新后无法重定向