centos 下文件夹共享

[root@localhost share]# yum install samba -y
[root@localhost share]# cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
[root@localhost share]# vi /etc/samba/smb.conf
#======================= Global Settings ===================================== [global] workgroup = WORKGROUP security = share map to guest = bad user #============================ Share Definitions ============================== [MyShare]
#修改为自己的共享路径 path = /share browsable =yes writable = yes guest ok = yes read only = no load printers = no printing = bsd printcap name = /dev/null disable spoolss = yes

[root@localhost share]# chkconfig smb on  
[root@localhost share]# service smb start




在windows下访问\\IP就可以看见共享文件夹了
遇到无权限访问错误时将文件设为777权限并设置最宽松权限
[root@localhost share]# chmod 777 /share
[root@localhost share]# setenforce 0


注意:以上为快捷配置存在安全隐患,物理机器不推荐使用。
 

 

posted @ 2017-05-02 11:43  破冰Lab-Cookun  阅读(573)  评论(0编辑  收藏  举报