gpt4 book ai didi

azure - 无法删除 Azure 文件共享中的文件,错误 : The specified resource is read-only and cannot be modified at this time

转载 作者:行者123 更新时间:2023-12-03 03:59:06 26 4
gpt4 key购买 nike

尝试删除 Azure 存储文件共享中的文件时。我不断收到以下错误:

Failed to delete file'cs-firstName-lastname-domain-com-10033fff99999999/mslearn-my-app-folder-word-and-word-wd/.git/objects/pack/pack-someguid.idx'.Error: The specified resource is read-only and cannot be modified atthis time

尝试检查当前是否有任何打开的句柄,但我没有看到。 https://learn.microsoft.com/en-us/rest/api/storageservices/list-handles

<?xml version="1.0" encoding="utf-8"?>
<EnumerationResults>
<Entries />
<NextMarker />
</EnumerationResults>

此外,我尝试通过运行 powershell cmdlet New-PSDrive 从 Windows 连接到此 Azure 文件共享,但也使用 Remove-Item,出现以下错误

Remove-Item : Cannot remove item
Z:\mslearn-my-app-folder-word-and-word-wd/.git/objects/pack/pack-someguid.idx: **You
do not have sufficient access rights to perform this operation**.

有关如何将属性从只读更改/如何删除/或我缺少的任何内容的任何帮助。

谢谢

最佳答案

正如 @BhargaviAnnadevara-MSFT 共享的链接中所述,https://social.msdn.microsoft.com/Forums/en-US/6fde433a-aef0-49e9-8568-2aaf5a9b673a/unable-to-delete-a-file-from-azure-file-storage?forum=windowsazuredata只读属性只能在安装后删除,我做了以下操作。

  1. 使用 Azure 门户中提供的脚本安装文件共享
  2. 安装后,执行 ls 命令将显示文件属性
  3. 在 powershell 或 CMD 中更改文件属性。我发现通过 powershell 很难做到这一点,所以改用 ATTRIB cmd。 attrib pack-someguid.idx -R

更新:更简单的解决方案

<小时/>

https://learn.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-windows#mount-the-azure-file-share-with-file-explorer

关于azure - 无法删除 Azure 文件共享中的文件,错误 : The specified resource is read-only and cannot be modified at this time,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63241866/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com