把Linux上文件夹在windows映射为驱动器
只需要samba服务器
1、安装samba服务器
# yum install samba
2、设置共享文件夹
# vi /etc/samba/smb.conf
3、然后配置共享文件,编辑写入
如果需要用户登录
[global]里面修改
security = user
无需登录就是
security = share
[public]
path = /www/wwwroot
public = yes
writeable = yes
browseable = yes
guest ok = yes
4、最后再设置一下路径权限为777
# chmod 777 /www/wwwroot
5、重启smbd
# cd /etc/init.d
# smbd restart
5、绑定驱动器到
补充:如果弹出错误无法访问到远程位置,关闭Linux防火墙即可
暂时关闭防火墙
# systemctl stop firewalld
# service iptables stop
永久关闭防火墙
# systemctl disable firewalld
# chkconfig iptables off
添加访问用户及密码
# smbpasswd -a <用户名>
按提示输入想使用的密码即可