![嘗試在 CentOS 7 電腦上安裝 Azure 檔案儲存體時發生錯誤](https://rvso.com/image/668042/%E5%98%97%E8%A9%A6%E5%9C%A8%20CentOS%207%20%E9%9B%BB%E8%85%A6%E4%B8%8A%E5%AE%89%E8%A3%9D%20Azure%20%E6%AA%94%E6%A1%88%E5%84%B2%E5%AD%98%E9%AB%94%E6%99%82%E7%99%BC%E7%94%9F%E9%8C%AF%E8%AA%A4.png)
由於 Azure 檔案儲存體全面可用,因此可以使用 SMB 3.0 從本機電腦連接檔案儲存。當我嘗試安裝文件存儲時,它給出了一個錯誤,而我可以很好地Permission Denied
使用文件共享。smbclient
[root@server mnt]# mount -t cifs -o credentials=/root/smb.pass,vers=
3.0,rw //allendisk.file.core.windows.net/allendisk file/
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
使用smbclient
,它可以很好地連接。
[root@server mnt]# smbclient //allendisk.file.core.windows.net/allen
disk -mSMB3 -A /root/smb.pass
Domain=[X] OS=[] Server=[]
smb: \>
令人困惑的是,我可以連接到文件共享,但無法安裝在其上。我的smbclient
版本是4.1.12,cifs核心模組是6.2。
答案1
您將需要支援加密的 SMB 用戶端。看看這個:https://azure.microsoft.com/en-us/blog/azure-file-storage-now-generally-available/
在該 URL 中,它說:
請注意,由於 Linux SMB 用戶端尚未支援加密,因此從 Linux 掛載仍要求用戶端與檔案共用位於同一 Azure 區域。然而,對 Linux 的加密支援已列入社群負責 SMB 功能的 Linux 開發人員的路線圖上。未來支援加密的 Linux 發行版也將能夠從任何地方安裝 Azure 檔案儲存體。
答案2
我遇到了同樣的問題並透過以下步驟解決:
需要在mount指令中加入domain參數:
mount -t cifs //allendisk.file.core.windows.net/allendisk /files -o 使用者名稱=john.sample,密碼=change@123,域=CONTOSO,vers=3.0,rw
或者
mount -t cifs //allendisk.file.core.windows.net/allendisk /files -o credentials=/root/smb.pass,vers=3.0,rw
內容文件 smb.pass
[root@server-sp06 ~]# cat smb.pass
username=john.sample
password=change@123
domain=AZURE