yuhaohao

一.简单说明

某些情况下,我们需要配置Linux系统的目录为共享文件夹,windows下可以直接访问。这里可以直接安装samba进行。(samba是一款软件,主要提供cifs协议,基于文件系统传输)

二.安装配置

  • 安装samba软件
[root@localhost ~]# yum install -y samba
  • 修改配置
[root@localhost ~]# vim /etc/samba/smb.conf
[global]
	workgroup = SAMBA
	security = user

	passdb backend = tdbsam

	printing = cups
	printcap name = cups
	load printers = yes
	cups options = raw
        map to guest = Bad User
        dns proxy = no
[share]
        comment = Share Directories
        path = /home/test/
        public = yes
        browseable = yes
        writable = yes
        create mask = 0777
        directory mask = 0777
        force directory mode = 0777
        force create mode = 0777
  • 修改共享目录的权限
[root@localhost ~]# chmod -R 777 /home/test
  • 启动samba服务
[root@localhost ~]# systemctl restart smb
[root@localhost ~]# systemctl enable smb

三.Windows下配置共享

Samba服务启动后,Windows系统下按win+r键,输入\共享文件夹的IP地址,即可看到文件夹。

分类:

技术点:

相关文章:

  • 2021-09-11
  • 2021-07-08
  • 2021-05-20
  • 2021-06-26
  • 2022-12-23
  • 2021-08-31
  • 2022-02-01
  • 2022-12-23
猜你喜欢
  • 2021-07-19
  • 2022-01-27
  • 2022-12-23
  • 2022-01-29
  • 2021-05-08
  • 2021-09-08
  • 2021-07-06
相关资源
相似解决方案