windows7 和 centos 共享文件夹配置

1. 安装 samba
yum -y install samba

2. 配置 samba
# vim /etc/samba/smb.conf

[global]

workgroup = wordgroup
display charset = UTF-8
unix charset = UTF-8
dos charset = cp936
server string = Samba Server Version %v

security = share
passdb backend = tdbsam

load printers = no
cups options = raw

[www]
comment = WWW Directories
path = /home/www
browseable = yes
writable = yes
public = yes
create mask = 0755
valid users = www
username map = /etc/samba/smbusers

注意:valid users = www 为系统用户www, 为运行 nginx, php 的用户

3. 运行
# service smb restart
好了,在 windows 7 按 win+r 键运行
//ip