• Sharing files and folders with Samba - Definitive Guide

              by Flavio Antonini - 2016

    install samba
    sudo pacman -S samba

    install nautilus sharing
    sudo pacman -S nautilus-share

    install “gnome-user-share”, by “pamac-manager” or following command:
    sudo pacman -S gnome-user-share

    stop the following service…
    sudo systemctl stop samba
    sudo systemctl stop smbd

    verify if “smb.conf” file exist…
    ls -l /etc/samba

    if not then copy the file “smb.conf.default” to “smb.conf”
    (this fix also sharing printer troubleshooting)…
    cd /etc/samba
    sudo cp smb.conf.default smb.conf

    select to “OFF” “Sharing Personal Files” on “Sharing” under “System Settings”…
    System Settings --> Sharing --> Sharing Personal Files --> "OFF"

    create “usershare” folder…
    sudo mkdir -p /var/lib/samba/usershare

    change group of “usershare” folder…
    sudo chown root:sambashare /var/lib/samba/usershare

    change mode w/sticky bit on “usershare” folder…
    sudo chmod 1770 /var/lib/samba/usershare

    create a group “sambashare”…
    sudo groupadd -r sambashare

    verify if your user is in samba DB…
    sudo pdbedit -L -v

    if not then add your user to samba
    +(then give the sharing password)…
    **sudo smbpasswd -a **

    if previous command failed the try the following:
    **gpasswd sambashare -a **

    edit “smb.conf”…
    sudo gedit /etc/samba/smb.conf

    uncomment following line in “etc/samba/smb.conf” file
    +under [global] settings section…
    include = /etc/samba/smb.conf.%m

    add following lines at the end of [global] section of
    +“smb.conf” file then save file and exit gedit…
    usershare path = /var/lib/samba/usershare
    usershare max shares = 100
    usershare allow guests = yes
    usershare owner only = yes

    verifying if the following services is setting to “enable”…
    systemctl is-enables samba
    systemctl is-enables smbd

    if not then settings it to “enabled”…
    sudo systemctl enable samba
    sudo systemctl enable smbd

    now reboot linux…

    then, when system is ready, try to open nautilus (“File”)
    choose a folder to share, right click on it, then
    choose “Properties --> Sharing” and check “Sharing this folder”…

    now view network resource in “Nautilus”, click on icon with your
    PC name, click on it, then click on shared folder
    and enter the sharing password previously set…

    …and joy…

     NOTE: 1) Sometimes sharing is not immediately, and take some time to work after boot.
           2) If you uncheck "Sharing this folder", then you must click on unmount symbol on Nautilus tree to uncouple sharing.
  • Don’t get me wrong but is this known to work?
    I’m installing some other distro, this is how p!ssed I am with this problem!

    And I always get an error on the following command:
    sudo chown root:sambashare /var/lib/samba/usershare

    I’ve tried it on several machines and several installations and nothing worked.

  • Yes you are right! I apologize, but I was wrong to place the sequence of commands in the right order. BEFORE you must create the new “sambashare” group with the command:
    sudo groupadd -r sambashare
    and only AFTER changing owner and group in the folder with the command:
    sudo chown root:sambashare /var/lib/samba/usershare
    Forgive me for the misunderstanding, and many thanks for having communicated the error.

  • And it works, my friend!
    I was too tired to reply last night but I’ve managed to get it to work.

    Stubborn as I am and with Linux Mint installed and the file sharing working out of the box I went back and installed Antergos again and managed to figure out the order of the commands and get it to work by 2:30 in the morning.

    Someone PLEASE get this into to the wiki!

  • Darn!
    It doesn’t seem to work anymore, for some reason.

  • That’s my point.
    I had a machine installed with ANtergos and followed this post. Then the other on the wiki. None of them worked.I can see other computers but can’t get my stuff shared.

  • It feels like there’s a missis step.
    Other computers (and itself) can see my computer on the network but there’s never an identification windows popping up. Also, on Linux, there’s usually some kind of description like “ComputerName (File Sharing)” and in this case all I see is the computer name.
    I’ve tried it on Gnome and Cinnamon and the end result is the same.

    As far as infrastructure goes, I’ve changed nothing on my network. Not even settings.

    One thing I was doing wrong (i think) was the:

    sudo smbpasswd -a

    It should be:

    sudo smbpasswd -a USERNAME


    Still, nothing.

  • Then,
    the correct command is:
    sudo smbpasswd -a
    WITHOUT user parameter, because the user is yourself! It serves to add a SAMBA PASSWORD to access shared folder. Check if user “sambashare” exist, and if your account is added to it (“groups <yourusername>”), and if sharing password is setting. Furthermore chek if smbd service is running and enabled (all these commands are listed in my guide). Check if you have shared at least one folder with nautilus context menu.


  • Man, THANK YOU for your patience but I just can’t get it to work under Antergos with Cinnamon.
    And to prove I’m not doing anything wrong I just installed ApricityOS and everything is working fine.

    Don’t get me wrong, your guide did wonders on older installations but on the most recent ISO updates… I can’t say what it is but I’ve tried 3 times on new Cinnamon installs and 1 on Gnome. Nothing.

    I did it so many times that I even realized there’s a typo in your wiki:
    systemctl is-enables samba
    systemctl is-enables smbd

    Should be enabled

  • Well, you are NOT going to believe this.

    As I mentioned, it doesn’t work on a new installation. New as in “everything in default”. Including… drum roll… FIREWALL!! Bastard Firewall!

    Everything is, actually, great!!!


samba37 folder15 share11 smbd4 nmbd2 Posts 11Views 4337
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.