Centos7 samba 开发机配置

说明

linux 需要关闭 selinux

sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

安装配置工具 及samba

yum -y install ntsysv  setuptool system-config-firewall system-config-network*  setuptool system-config-network* vim-enhanced vixie-cron samba samba-client samba-common cifs-utils

去掉注释行

mv /etc/samba/smb.conf /etc/samba/smb.conf.bak
grep -v "^#"  /etc/samba/smb.conf.bak |grep -v "^;" > /etc/samba/smb.conf

代码放在开发机上面

SAMBA配置 不通的用户访问不同的文件夹 USER换成具体用户 添加用户

useradd USER
passwd USER

添加samba用户

smbpasswd -a USER

修改smb.conf

[global]
        workgroup = MYGROUP
        server string = Samba Server Version %v
        log file = /var/log/samba/log.%m 
        max log size = 50
        security = user
        passdb backend = tdbsam
        dns proxy = no
        load printers = no
        printing = bsd
        printcap name = /dev/null
        disable spoolss = yes

        writeable = yes
        browseable = yes
        create mask = 0777
        directory mask = 0777
[USER]
        path = /home/USER/web
        valid users=@USER

代码放在 客户端

开启区别文件大小写

在“添加删除程序”--->"启用或关闭windows功能"开启“适用于linux的windows子系统”

fsutil.exe file setCaseSensitiveInfo "需要区别大小写的目录" enable

window

打开控制面板-->程序和功能-->启动SMB 1.0/CIFS文件共享支持 设置共享文件夹

开发机上挂在文件

mount -t cifs -o username=admin,password=123,uid=48,gid=48 //192.168.3.10/code /home/dawnco

发表评论

电子邮件地址不会被公开。 必填项已用*标注

Captcha Code