我是一个新的 Linux 用户,我正在尝试设置我的 centOS 计算机以便能够与我的 Windows 计算机共享文件,但我无法让它工作。
我的想法是,我使用 Windows PC 从互联网上下载一些东西,下载位置在 CentOS PC 上的某个地方。
我遇到的问题是我无法连接到 centOS 电脑,我尝试写入 ip 地址,但 windows 只是说“Windows 无法访问 \\192.168.0.110”这是 Windows 给出的错误
这是我的 smb.conf。
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.
[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = RHEL
security = user
dns proxy = no
passdb backend = tdbsam
hosts allow = 192.168.0.0/24
printing = cups
printcap name = cups
load printers = yes
cups options = raw
wins support = yes
local master = yes
preferred master = yes
map to guest = bad user
client min protocol = SMB 3
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @printadmin root
force group = @printadmin
create mask = 0664
directory mask = 0775
[Anonymus]
comment = Anonymus File Share Server
path = /disk1/samba/plex/
browsable = yes
writable = yes
guest ok = yes
read only = no
force user = nobody
`
[root@192-168-0-110 ~]# /usr/sbin/sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Memory protection checking: actual (secure)
Max kernel policy version: 31
`
[root@192-168-0-110 ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2020-03-24 09:54:50 EET; 3 days ago
Docs: man:firewalld(1)
Main PID: 1013 (firewalld)
Tasks: 3 (limit: 17928)
Memory: 29.3M
CGroup: /system.slice/firewalld.service
└─1013 /usr/libexec/platform-python -s /usr/sbin/firewalld --nofork --nopid
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
我的 Windows 计算机位于 WORKGROUP 上。
我打开了 smb 1.0 功能。
我在CentOS防火墙中激活了smb服务。
这些计算机位于同一个网络上。
我已经打开网络发现和文件和打印机共享,并且公共文件夹共享也使用 128 加密并且密码保护共享已关闭。
答案1
你的centos8端防火墙怎么样?
systemctl status firewalld.service
你的 centos8 端 SElinux 怎么样?
/usr/sbin/sestatus