CentOS 8
Sponsored Link

Samba : Fully Accessed Shared Folder2019/10/31

 
Install Samba to Configure File Server.
For example, Create a fully accessed shared Folder which anybody can read and write, and also authentication is not required.
[1] Install and Configure Samba.
[root@smb ~]#
dnf -y install samba
[root@smb ~]#
mkdir /home/share

[root@smb ~]#
chmod 777 /home/share

[root@smb ~]#
vi /etc/samba/smb.conf
[global]
        # line 7 : add (set charset)
        unix charset = UTF-8
        # change (Windows default)
        workgroup = WORKGROUP
        security = user
        # add (IP addresses you allow to access)
        hosts allow = 127. 10.0.0. 
        # add (no authentication)
        map to guest = Bad User

.....
.....

# add to the end
# any Share name you like
[Share]
        # specify shared directory
        path = /home/share
        # allow writing
        writable = yes
        # allow guest user (nobody)
        guest ok = yes
        # looks all as guest user
        guest only = yes
        # set permission [777] when file created
        force create mode = 777
        # set permission [777] when folder created
        force directory mode = 777 

[root@smb ~]#
systemctl enable --now smb

[2] If SELinux is enabled and also use [/home] like this example, Change SELinux policy.
[root@smb ~]#
setsebool -P samba_enable_home_dirs on

[root@smb ~]#
restorecon -R /home/share

[3] If Firewalld is running, allow Samba service.
[root@smb ~]#
firewall-cmd --add-service=samba --permanent

success
[root@smb ~]#
firewall-cmd --reload

success
Matched Content