試過在 Debian 及 Ubuntu 衍生發行版上都沒問題
1. 安裝 Samba packages
apt update
apt install samba smbclient cifs-utils
2. 創建 Shared Samba Directory/Folder
只創建一個不用密碼分享的資料夾
mkdir /public
3. Setup Samba File Server
在 samba 設定檔 /etc/samba/smb.conf 加入以下參數
[public]
comment = Public Folder
path = /public
writable = yes
guest ok = yes
guest only = yes
force create mode = 777
force directory mode = 777
4.
Update the permissions of the Shares
chmod 2777 /public (網上教是用2775但實作時不能寫入)
5. Restart Samba service
systemctl restart nmbd
6. Allow Remote Access to Samba
若有開啟防火牆要執行以下指放行連入,否則也會出現access deny的問題
ufw allow from 192.168.xxx.xxx/24 to any app Samba
Reference
主要是跟以下網頁設置,內文也有教如可設定私人資料夾
https://kifarunix.com/quick-way-to-setup-samba-file-server-on-debian-10/
沒有留言:
發佈留言