Azure Public file share/Container

Devin 20 Reputation points
2023-09-14T16:19:53.4233333+00:00

is it possible to create a public share that anyone can get to via a UNC path (or any other way). Want to be able to put files (pdf/stl) into a storage and anyone given the creds can go to the path and retrieve. Security isn't an issue.

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,277 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ramya Harinarthini_MSFT 5,346 Reputation points Microsoft Employee
    2023-09-19T07:45:37.1566667+00:00

    James Simon Welcome to Microsoft Q&A, thank you for posting your here!!

    To access the Azure File share Publicly please follow below steps:

    Step:1 Create Azure Storage account from Azure Portal

    User's image

    Reference Link: https://learn.microsoft.com/en-us/azure/storage/files/storage-how-to-create-file-share?tabs=azure-portal&WT.mc_id=AZ-MVP-5004796#create-a-storage-account

    Step:2 Create Azure File share

    User's image

    User's image

    Step:3 Now access the created Azure File share from your on-premises machine through UNC path.

    Click on the Connect option from the newly created Azure File share.

    User's image

    User's image

    Copy the Script in the Notepad and note the -Root and User and pass fields to use in the below steps.

    $connectTestResult = Test-NetConnection -ComputerName archivecopytest.file.core.windows.net -Port 445
    if ($connectTestResult.TcpTestSucceeded) {
        # Save the password so the drive will persist on reboot
        cmd.exe /C "cmdkey /add: "storageaccountname.file.core.windows.net" /user:`"localhost\storageaccountname`" /pass:`"accesskey"
        # Mount the drive
        New-PSDrive -Name Z -PSProvider FileSystem -Root "\\storageaccountname.file.core.windows.net\myfileshare" -Persist
    } else {
        Write-Error -Message "Unable to reach the Azure storage account via port 445. Check to make sure your organization or ISP is not blocking port 445, or use Azure P2S VPN, Azure S2S VPN, or Express Route to tunnel SMB traffic over a different port."
    }
    

    You can directly access your Azure file share using the UNC path by entering the following into File Explorer. Be sure to replace storageaccountname with your storage account name and myfileshare with your file share name:

    \\storageaccountname.file.core.windows.net\myfileshare

    User's image

    User's image

    You'll be asked to sign in with your network credentials. Sign in with the Azure subscription under which you've created the storage account and file share. If you do not get prompted for credentials you can add the credentials using the following command:

    cmdkey /add:StorageAccountName.file.core.windows.net /user:localhost\StorageAccountName /pass:StorageAccountKey

    For Azure Government Cloud, simply change the servername to:

    \\storageaccountname.file.core.usgovcloudapi.net\myfileshare

    Reference Link: https://learn.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-windows#access-an-azure-file-share-via-its-unc-path

    Important Note:

    Ensure port 445 is open: The SMB protocol requires TCP port 445 to be open. Connections will fail if port 445 is blocked. You can check if your firewall or ISP is blocking port 445 by using the Test-NetConnection cmdlet. See Port 445 is blocked.

    Hope this helps!
    Kindly let us know if the above helps or you need further assistance on this issue.


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Luke Murray 11,076 Reputation points MVP
    2023-09-18T05:59:56.48+00:00

    Hi, Devin

    You can create an Azure File Share, on a Storage account.

    See: Create an SMB Azure file share.

    0 comments No comments

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.