FTP 到 Azure Blob 存储

FTP to Azure Blob Storage

我必须使用流行的 FTP 客户端(例如 FileZilla)为 Azure Blob 存储设置安全 FTP。在做了很多研究之后,我遇到了一个 link 上面写着:

Deployed in a worker role, the code creates an FTP server that can accept connections from all popular FTP clients (like FileZilla, for example) for command and control of your blob storage account.

按照 link 的说明,我实施了相同的操作并在 Azure 生产环境中部署了辅助角色,并且成功了。但是我仍然无法使用 FileZilla 连接 FTP 主机服务器(由我在配置文件中提供)。我不知道我做错了什么或错过了什么。

但是为什么呢?

已经有两个非常好的 FTP-style Azure 存储客户端:
http://storageexplorer.com and http://azurestorageexplorer.codeplex.com

它们都作为 @Guarav well pointed out, can use a Shared Access Signature (SAS) 在不公开帐户密钥的情况下连接到 Azure 存储。 如果您正在构建多租户服务,那么您可以为每个客户使用不同的 SAS - 尽管如果您考虑一下 - 这不是一个很好的分离边界。

我会为每个客户使用一个单独的存储帐户。这样,如果存储帐户遭到破坏,它只会影响一个客户。以下限制适用:

来自https://azure.microsoft.com/en-us/documentation/articles/storage-scalability-targets/

Scalability targets for blobs, queues, tables, and files

Number of storage accounts per subscription: 200

This includes both Standard and Premium storage accounts. If you require more than 200 storage accounts, make a request through Azure Support. The Azure Storage team will review your business case and may approve up to 250 storage accounts.

如果您愿意使用 Node.js 进行一些编程,您可以托管由 Azure Blob 直接支持的 FTP 服务器。

您可以使用 nodeftpd combined with azure-storage-fs. nodeftpd is the FTP server written in Node.js and support third-party file system manager. azure-storage-fs is a file system manager that is designed to use for nodeftpd 并直接与 Azure Blob 对话。

文件系统管理器集成代码在README.md of azure-storage-fs下写的很清楚。但是您需要自己编写验证码。

我现在(2022 年)遇到了这个问题,并注意到 MS 现在直接在 Azure 存储中提供 SFTP。不过该功能目前处于预览阶段。

https://docs.microsoft.com/en-us/azure/storage/blobs/secure-file-transfer-protocol-support