dnf -y install samba
cd /etc/samba/
vi smb.conf
/ home/yamato /
is your home directory.
[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = centos8
security = user
map to guest = bad user
dns proxy = no
[Share]
path = /home/yamato/
browsable =yes
writable = yes
guest ok = yes
read only = no
Example: If you connect to/home/yamato with Explorer and want to edit the files located in/home/yamato/myapp/from Windows 10.
cd /home/
chmod 777 yamato
cd /home/yamato/
chown -R nobody: myapp
firewall-cmd --permanent --zone=public --add-service=samba
firewall-cmd --reload
systemctl enable smb.service
systemctl enable nmb.service
systemctl restart smb.service
systemctl restart nmb.service
Enter the IP address of the virtual server in the address bar of Explorer, Connect with a CentOS user with a password.
\\192.168.1.14
If you can see the file from Explorer, it's OK.
Recommended Posts