Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Samba to share files on CentOS

2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article focuses on "how to use Samba to share files on CentOS". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to use Samba to share files on CentOS.

First check whether samba has been installed, if there is an installation or samba components, it is best to uninstall before installation: installation environment: centos7

Rpm-qa | grep samba

Confirm that there is no installation and install samba:

Yum-y install samba

Then create a shared folder directory and change permissions, this time directly create / home/share:

Mkdir / home/sharechmod 777 / home/share

Configure smb.coonf, general directory is / etc/samba/smb.conf

Insert the following clip directly:

[share] comment = Share Directoriespath=/home/sharepublic = yesbrowseable = yeswritable = yescreate mask = 0777directory mask = 0777

It is easy to configure sharing without adding shared accounts and authentication.

Use the command testparm to check for syntax problems with smb.conf.

Start the samba service:

Service smb restart

At this point, you need to turn off the firewall to access.

Systemctl stop firewalld.service

Disable firewall boot:

Systemctl disable firewalld.service

Finally, close se linux:

Vim / etc/sysconfig/selinux

Change SELINUX=enforcing to SELINUX=disabled

The samba configuration is complete.

You can open and run win+R on windows and enter:\\ 192.168.52.112\ share to view the folder.

At this point, I believe you have a deeper understanding of "how to use Samba to share files on CentOS". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report