Fedora36: File server settings

Install samba.

Install samba.

[root@www ~]# dnf install samba samba-client samba-common -y

Initial configuration of samba.

Back up samba configuration files.

[root@www ~]# mv /etc/samba/smb.conf /etc/samba/smb.conf.bk

Configure samba.

[root@www ~]# vi /etc/samba/smb.conf

Create a file.

[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = fedora
security = user
map to guest = bad user
dns proxy = no
ntlm auth = yes
#==========================================================
[Share]
#Shared folder
path = /samba/share/
#Whether or not it is displayed in My Network
browsable = yes
#write permission
writable = yes
#Allow guest users to login
guest ok = yes
#Read permission
read only = no
#File attributes
force create mode = 0777
#Directory attributes
force directory mode = 0777

Create a shared folder.

root@www:~# mkdir /samba
root@www:~# mkdir /samba/share
root@www:~# chown nobody:nobody /samba/share
root@www:~# chmod 0777 /samba/share

Start automatically.

[root@www ~]# systemctl enable --now smb.service
[root@www ~]# systemctl enable --now nmb.service

Restart.

[root@www ~]# reboot

Restart the client Windows PC, open “Network” → “centos” → “Share” and confirm that writing is possible. (If “Network” → “centos” is not displayed, right-click anywhere on the desktop to create a new folder, right-click the new folder to create a shortcut, and right-click the shortcut to Open the properties and change the link destination to “\centos” to connect.)

WindowsPC

コメント

タイトルとURLをコピーしました