- 安装 Samba
sudo apt update
sudo apt install samba
- 创建共享文件夹
- 设置权限:向所有用户授予对“share”文件夹的读写权限
sudo chmod -R 777 /yi/share
sudo chown -R abc /yi/share
- 配置 Samba
sudo vim /etc/samba/smb.conf
[anon_share]
comment = Directory anonymous
path = /yi/share
public = yes
writable = yes
read only = no
guest ok = yes
create mask = 0775
directory mask = 0775
force create mode = 0775
force directory mode = 0775
- 重新启动 Samba
sudo systemctl restart smbd
其它参考:https://synay.net/cn/support/kb/file-sharing-using-samba-debian-12-vps-server