安裝:linux
yum install samba
添加smb用戶:spa
smbpasswd -a root
/etc/samba/smb.conf 追加:code
[public] path = / valid users = root browseable = yes writable = yes
*****重點*****,設置SELinux 成爲permissive模式,臨時關閉selinux的不然沒法會提示無權限訪問文件夾blog
setenforce 0
啓動:it
service samb start