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-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

Today Xiaobian to share with you how to use Samba shared files on CentOS related knowledge points, detailed content, clear logic, I believe most people still know too much about this knowledge, so share this article for everyone to refer to, I hope you read this article after some harvest, let's learn about it together.

Samba is a free software that implements SMB protocol on Linux and UNIX systems. It consists of server and client programs. SMB (Server Messages Block) is a communication protocol for sharing files and printers on a local area network. It provides sharing services such as files and printers among different computers in a local area network.

Installation environment: centos7

First check whether samba is installed, if there is installation or samba components, it is best to uninstall and install:

rpm -qa |grep samba

Confirm that samba is not installed and installed:

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, the general directory is/etc/samba/smb.conf

Insert the following fragment directly:

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

Simple configuration sharing, no need to add shared accounts and authentication.

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

Start samba service:

service smb restart

You need to turn off the firewall to access it.

systemctl stop firewalld.service

Disable firewall startup:

systemctl disable firewalld.service

Finally, close selinux:

vim /etc/sysconfig/selinux

For SELINUX=enforcing read SELINUX=disabled

Samba configuration complete.

You can open it on Windows with Win+R, type: \192.168.52.112\share, and view the folder.

That's all for "How to use Samba shared files on CentOS". Thank you for reading! I believe everyone has a great harvest after reading this article. Xiaobian will update different knowledge for everyone every day. If you want to learn more knowledge, please pay attention to the industry information channel.

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

Development

Wechat

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

12
Report