centos 配置 samba 与windows共享文件夹

yum install samba


/etc/samba/smb.conf

directory mask = 0777  ← 指定新建目录的属性(以下4行)
 force directory mode = 0777 
directory security mask = 0777 
force directory security mode = 0777 
create mask = 0777  ← 指定新建文件的属性(以下4行) 
force create mode = 0777 
security mask = 0777 
force security mode = 0777 
workgroup = MYGROUP 


 security = share        //这里要改
 passdb backend = tdbsam

文 [public]
 comment = Public Stuff 
path = /home/samba 
 public = yes 
writable = yes

chown -R nobody /home/samba
chmod 777 /home/samba

设置防火墙允许139端口

 

 

 

linux 挂载 linux下共享的文件夹

sudo mount -t cifs -o username="nobody",password="" //192.168.1.168/public /mnt/samba(前提条件是win下的目录已经共享了)

posted @ 2014-05-09 09:48  幻星宇  阅读(455)  评论(0编辑  收藏  举报