How to realize file sharing between windows and Linux

WBOY
Release: 2023-05-15 23:16:04
forward
5164 people have browsed it

1. Ban Guest

1. Right-click "My Computer" —> Click Management
2. Enter the computer management interface:
Click System Tools —> Local Users and Groups -> Users -> Cancel the "Account is disabled" option

2. Set shared directory permissions

1. Right-click the directory that needs to be shared (this example file Name TEST), click Properties——> Sharing-Sharing

drop-down option and select Everyone——> Click Add——> Sharing

2. Then click Security——> Edit - Select Everyone user - Check all allowed permissions - Apply - OK - OK

3. Set local policy

1. Open the command box (win key R)——>Enter secpol. msc——>Select local policy——>User rights assignment——>Deny access to this computer from the network——>Delete Guest user

2. Security options——>Network access: Sharing and security model for local accounts——>Select: Guest only

3. Control Panel——>Programs——>Programs and Features——>Turn Windows features on or off——> Check the SMB 1.0/CIFS file sharing option and sub-options

The computer will be restarted after the settings are completed

4. Close Windows Firewall

Control Panel——> Windows Defender Firewall ——> Enable or turn off Windows Defender Firewall——> Select to turn off the firewall——> Click OK

Now the windows server configuration is completed

5. Llinux client configuration and mounting

1. Check whether samba-client is installed

[root@localhost ~]# rpm -q samba-client
samba-client-4.10.16-20.el7_9.x86_64

# 如果没有安装 
[root@localhost ~]# yum -y install samba-client

# smbclient -L //服务端ip     (服务端ip也就是windows电脑ip)
[root@localhost ~]# smbclient -L //192.168.88.57    # 回车之后提示输入密码,不需要输入直接回车
Enter SAMBA\root's password: 

	Sharename       Type      Comment
	---------       ----      -------
	ADMIN$          Disk      远程管理
	C$              Disk      默认共享
	D$              Disk      默认共享
	E$              Disk      默认共享
	IPC$            IPC       远程 IPC
	TEST            Disk      
Reconnecting with SMB1 for workgroup listing.
do_connect: Connection to 192.168.88.57 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
Unable to connect with SMB1 -- no workgroup available
Copy after login

2. Check whether cifs-utils is installed

[root@localhost ~]# rpm -q cifs-utils
cifs-utils-6.2-10.el7.x86_64

# 如果没有安装
[root@localhost ~]# yum -y install cifs-utils
Copy after login

3.Mount directory

# 创建挂载目录
[root@localhost ~]# mkdir /data
[root@localhost ~]# mount.cifs //192.168.88.57/TEST  /data   # 提示输入密码,不需要输入直接回车
# 查看挂载目录
[root@localhost ~]# df -hT
Copy after login

The above is the detailed content of How to realize file sharing between windows and Linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!