Skip to main content

ubuntu安装samba文件共享系统

· One min read

安装软件包​

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