Azure php web app to sftp blob connection

prasantc 976 Reputation points
2024-01-05T16:30:41.84+00:00

I have enabeld hierachical name space blog storage with sftp. I have created 6 sftp users and now trying to connect php web app to those container with password based auth.

I can connect with from the web ssh but I could not figure out conf file or settings to add those to php.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,192 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,935 questions
{count} votes

Accepted answer
  1. Silvia Wibowo 6,041 Reputation points Microsoft Employee Volunteer Moderator
    2024-01-08T01:52:20.1333333+00:00

    Hi @prasantc , I understand that you're trying to use Azure Blob Storage via SFTP from your PHP Web App deployed on Azure Web App. You've created 6 local users for SFTP in Azure Blob Storage.

    Next step is to put the correct permissions for each user. Note: you can specify only container-level permissions. Directory-level permissions aren't supported.

    As you configure permissions, you have the option of setting a home directory for the local user. If no other container is specified in an SFTP connection request, then the home directory is the directory that the user connects to by default.

    Then your web app needs to figure out how to connect to an SFTP server. I don't have any experience for this, please refer to general PHP instruction. One blog that I found (disclaimer: I have not tried/verified this - you do this entirely at your own risk and you are responsible for ensuring that any accessed material does not infringe any laws or might cause offence in any other way): How to connect to SFTP with PHP (sftptogo.com).

    Use the following example for username and hostname, adjusting them to your own username and storage account name:

    User's image

    Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.