Home > Operation and Maintenance > CentOS > How to solve the problem that the samba service cannot be accessed in CentOS

How to solve the problem that the samba service cannot be accessed in CentOS

angryTom
Release: 2020-03-20 15:35:02
Original
3783 people have browsed it

How to solve the problem that the samba service cannot be accessed in CentOS

How to solve the problem that the samba service cannot be accessed in CentOS

After the samba service is installed and configured under centOS, it cannot be accessed. There are two reasons:

1. The samba service cannot be accessed due to the firewall.

2. Because SELinux is started, the directory cannot be accessed.

Recommended learning: Linux tutorial

For these two problems, the corresponding solutions are:

1. The samba service is allowed through the firewall

firewall-cmd --permanent --zone=public --add-service=samba
firewall-cmd --reload
Copy after login

2. SELinux allows samba

View samba status

getsebool -a | grep samba
Copy after login

Grant permissions

setsebool -P samba_enable_home_dirs=1
chcon -t samba_share_t /data/share/
Copy after login

This article comes from the PHP Chinese website, CentOS usage tutorial column, please pay attention to this column for more related tutorials!

The above is the detailed content of How to solve the problem that the samba service cannot be accessed in CentOS. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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