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
2. SELinux allows samba
View samba status
getsebool -a | grep samba
Grant permissions
setsebool -P samba_enable_home_dirs=1 chcon -t samba_share_t /data/share/
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!