I have some difficulties with sharing folders in a local area network by using samba. I have managed everything up to the point that every folder that I share is being detected, can be read and can be written to. My problem however is, that next to the folders that I have explicitly shared, also my
/home/carlos folder can be accessed. So basically all my data is exposed unintentionally. Currently I have my firewall blocking samba, so nothing is exposed at the moment, however I want to use samba though. I would like some assistance in correctly configuring samba.
What have I done so far
Copied default configuration file:
cp /etc/samba/smb.conf.default /etc/samba/smb.conf
Changed workgroup from MYGROUP into Baptista and add these lines to the
[global] section in
usershare allow guests = Yes usershare max shares = 100 usershare owner only = False
[homes] section configuration to read
[homes] comment = Home Directories browseable = No writable = No
Run these commands in a terminal:
# mkdir /var/lib/samba/usershares # chgrp users /var/lib/samba/usershares/ # chmod 1775 /var/lib/samba/usershares/ # chmod +t /var/lib/samba/usershares/
(these commands and several settings were taken from section 1.7 of https://wiki.archlinux.org/index.php/Samba/Troubleshooting)
Share a folder by launching Dolphin, right-click a folder, select properties, select the share tab, configure settings and press OK.
Let assume I shared the folder
/home/carlos/Music, then not only is
/home/carlos/Music available through samba, my entire
/home/carlos is available. How can I fix this, such that only the folders than I explicitly share, are shared?
- Chakra Linux, 64-bit
- Linux kernel 3.12.6-1
- KDE 4.12.0
- Qt 4.8.5
- Samba 4.1.1-1
- Two laptops, same OS, same username