How To Configure Samba Server For File Sharing
Samba Server is an open source file and printer sharing services. you can configure samba server in Linux. This is free software re-implementation of SMB networking protocols. You can share files on both Linux and windows. you can samba install and configure and can also give user based samba access to the directory.
Check Out : How To Install Samba File Sharing Server
I’m supposing you have installed samba server on your machine. Today i will show how to access directory on Linux server from your machine over the network. you can share folder samba directory.
yum install samba samba-client samba-common -y
Step 1 : create a user and set the samba password for that user.
Now set the password for user test,
smbpasswd -a test
Step 2 : make a directory to share it with users and change the owner of that directory and give the R/W permission on that folder to user.
chown -R test /data
chmod 775 /data
if you need this, you can also make a group and user in the group that directory will be accessed by those user. share folder samba
usermod -aG groupname username
Step 3 : if you have firewall enable on the machine. So you will have to open the port 137, 445 and 139 and if selinux is enabled, so you need to change the selinux context on the directory.
chcon -R -t samba_share_t /data
Make an original copy of smb.conf
cp smb.conf smb.conf-back
Write the code in smb.conf file.
With group, make only changes in valid users = @groupname
Step 4 : Now access the samba share directory from windows and just type the ipaddress in run command. samba configure user access
just click on your share directory folder and login as registered user. In our case, we made test user. And click on connect
And try to create any folder and write a file. samba install and configure
YouTube Link : Samba file sharing