欢迎光临散文网 会员登陆 & 注册

搭建 samba,win10访问centos7共享的文件路径

2021-11-09 11:26 作者:Vecloud_  | 我要投稿


centos7 搭建 samba,win10访问centos7共享的文件路径首先安装samba相关的服务yum install -y samba*配置samba的配置文件cp /etc/samba/smb.conf /etc/samba/smb.conf.bakvim /etc/samba/smb.conf//修改配置文件smb.conf的内容为下述内容[global]log file = /var/log/samba/log.%mmax log size = 50security = usermap to guest = Bad User[sambadir]path=/home/readonly=yesbrowseable=yeswritable = yes guest ok=yes配置系统文件打开数目上限(因为后续会通过samba文件打开大量文件,所以需要修改此参数)vim /etc/security/limits.conf//文件末尾需要添加如下内容* soft nofile 65535* hard nofile 65535//修改该文件后,需要reboot,这里暂不reboot,后面关闭防火墙后也需要reboot关闭防火墙vim /etc/selinux/config                      #永久关闭selinuxset SELINUX=disabled       #SELINUX=enforcing改为SELINUX=disabled//关闭firewallsystemctl stop firewalldsystemctl disable firewalld//这里需要reboot才能生效reboot启动SAMBAsystemctl restart smb #重启systemctl enable smb #修改为开机启动systemctl status smb #查看状态在window文件浏览器里输入\your samba server ipwin10 下开启网络发现。 
https://jingyan.baidu.com/article/c275f6ba3ef050e33d756702.htmlwin10下可能无法访问共享文件夹解决//管理员权限进入cmd//开启SMBv1sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi sc.exe config mrxsmb10 start= auto//关闭SMBv2 and SMBv3sc.exe config lanmanworkstation depend= bowser/mrxsmb10/nsi sc.exe config mrxsmb20 start= disabled(需要重启win10)完毕

了解更多网络知识关注:http://www.vecloud.com/

搭建 samba,win10访问centos7共享的文件路径的评论 (共 条)

分享到微博请遵守国家法律