Samba File Share Installation - LeandroTheDev/arch_linux GitHub Wiki
Download
- sudo pacman -S samba
Configuration
- sudo vim /etc/samba/smb.conf Add
[global]
workgroup = MYGROUP
server string = My Server
server role = standalone server
log file = /usr/local/samba/var/log.smbd
max log size = 50
dns proxy = no
[diskname]
path = /samba/diskname/
writable = yes
browsable = yes
create mask = 0700
directory mask = 0700
read only = no
guest ok = no
First create the group for disk permission
- sudo groupadd -r mydiskgroup
Create the user for login if not exist
- sudo useradd -G mydiskgroup myuser
-
If exist then add the group for existing user
sudo usermod -aG mydiskgroup myuser
Add a password for the user to login in samba
- sudo smbpasswd -a myuser
Configuring the folder
Creating the samba folder
- sudo mkdir /samba
- sudo mkdir/samba/diskname
Giving permissions for the group
- sudo chown -R :mydiskgroup /samba/diskname
- sudo chmod 2775 /samba/diskname
Starting the samba
For based linux
- sudo systemctl enable --now smb
For unbased windows users
- sudo systemctl enable --now nmb