安装软件包
sudo apt install samba
修改配置文件
sudo vim /etc/samba/smb.conf
新增以下配置
[shared]
comment = shared directory
path = /data/shared
public = yes
writable = yes
available = yes
browsable = yes
create mask = 0777
directory mask = 0777
修改目录权限
chmod 777 -R /data/shared
家庭局域网环境下给777即可
测试参数是否正确
testparm
重启samba
sudo systemctl restart smbd