I installed samba to get the dolphin share function working so that I could get the file transfer working between my server and phone. When I went to activate the share of the file in dolphin I got this error:
“No Samba file sharing service was found. This is a packaging issue, and should be reported to NixOS on their bug reporting website.”
I also tried a file manger on my android phone and could not get connected to my server. The app recognized my server hostname and ip address but couldn’t connect after entering my cred’s. I have verified my user is apart of the samba group and have setup the samba user password. I’m using unstable 26.05 Pre.
I have tried many different setups in my configuration.nix file and the following is my last attempt:
networking.firewall.allowedTCPPorts = [ 445 139 2049 ];
networking.firewall.allowedUDPPorts = [ 137 138 ];
Samba Usershares
services.samba = {
package = pkgs.samba4Full;
usershares.enable = true;
enable = true;
openFirewall = true;
};
Avahi handles mDNS discovery for Linux/Mac
services.avahi = {
enable = true;
openFirewall = true;
nssmdns4 = true;
publish = {
enable = true;
addresses = true;
domain = true;
hinfo = true;
userServices = true;
workstation = true;
};
};
samba-wsdd handles discovery for Windows
services.samba-wsdd = {
enable = true;
openFirewall = true;
};
I have stopped and started the systemd for samba and the status doesn’t show any issues. The following is my smb.conf:
[global]
invalid users=root
passwd program=/run/wrappers/bin/passwd %u
security=user
usershare allow guests=true
usershare max shares=100
usershare path=/var/lib/samba/usershares
sudo systemctl start samba-nmbd && sudo systemctl start samba-smbd
sudo systemctl stop samba-nmbd && sudo systemctl stop samba-smbd
sudo systemctl status samba-nmbd
sudo systemctl status samba-smbd
Any help would be apprecaited.
Thanks
I found that I used the wrong password which caused my phone file manager connectivity issue. Using the correct password does let the phone and computer connect but the computer doesn’t allow any folder to be connected.
I tried a clean install on another computer and got the same result…
“No Samba file sharing service was found. This is a packaging issue, and should be reported to NixOS on their bug reporting website.”
I have used this approach for several years (KDE file share and samba). Here is the smb.conf file I used:
###############Samba Setup for Fedora################
##6/28/18
##Reference Samba - ArchWiki
##Copy smb.conf to /etc/samba/smb.conf and /etc/samba/smb.conf.default
mv /etc/samba/smb.conf /etc/samba/smb.conf.old
cp -r /home/william/Dropbox/Linux_setup_files/Other_Distros/Fedora/smb.conf /etc/samba/smb.conf
cp -r /home/william/Dropbox/Linux_setup_files/Other_Distros/Fedora/smb.conf /etc/samba/smb.conf.default
##Copy and paste the following in terminal as root
mkdir -p /var/lib/samba/usershare
groupadd -r sambashare
chown root:sambashare /var/lib/samba/usershare
chmod 1770 /var/lib/samba/usershare
usermod -a -G sambashare william
pdbedit -a -u william
systemctl enable smb.service
systemctl enable nmb.service
reboot
##Right click on folder to share and select properties then select share
service smb restart && service nmb restart
usershare path = /var/lib/samba/usershare
usershare max shares = 100
usershare allow guests = yes
usershare owner only = False
#security = share (version 3 only)
security = user
##Combined command
mkdir -p /var/lib/samba/usershare && groupadd -r sambashare && chown root:sambashare /var/lib/samba/usershare && chmod 1770 /var/lib/samba/usershare && usermod -a -G sambashare william && pdbedit -a -u william
sudo mkdir -p /var/lib/samba/usershare && sudo groupadd -r sambashare && sudo chown root:sambashare /var/lib/samba/usershare && sudo chmod 1770 /var/lib/samba/usershare && sudo usermod -a -G sambashare william && sudo pdbedit -a -u william
Fedora
service smb start && service nmb start
service smb stop && service nmb stop
service smb restart && service nmb restart
systemctl enable smb.service
systemctl enable nmb.service
I found this link with other alternatives:
I’m leaning toward the KDEconnect route. Anyone that has any experience with any file transfer process would be appreciate.
Thanks
I have been looking for a way to create a samba share like the nfs share. I haven’t found a clear way to do it yet but would appreciate any help in creating it.
OK
I believe I have gotten what I want…
I found this samba configuration:
gist: Addding samba file sharing in NixOS · GitHub
{...}: {
services = {
samba = {
enable = true;
package = pkgs.samba4Full;
openFirewall = true;
settings = {
global = {
"server smb encrypt" = "required";
"server min protocol" = "SMB3_00";
"workgroup" = "WORKGROUP";
"security" = "user";
};
testshare = {
"path" = "/home/bahrom/Public";
"writable" = "yes";
"comment" = "Hello World!";
"browseable" = "yes";
};
};
};
samba-wsdd = {
enable = true;
openFirewall = true;
};
avahi = {
enable = true;
publish.enable = true;
publish.userServices = true;
openFirewall = true;
};
};
}
I ended up with this samba configuration:
# Samba Usershares
services = {
samba = {
enable = true;
package = pkgs.samba4Full;
openFirewall = true;
settings = {
SMBshare = {
"path" = "/path/to/your/folder";
"writable" = "yes";
"comment" = "Hello World!";
"browseable" = "yes";
};
};
};
};
The result gives me the same as if I used KDE dolphin / share.
- Use a file manager on your phone that has samba / network ability
- The select remote or network in the file manager
- The hostname or ip address should automatically be seen by your file manager.
- Login to your computer via your phone with your samba cred’s
- You should see SMBshare folder
- Single / double click on SMBshare and you will see the contents of the folder you created in your path.
- You should have read / write permissions of the computer folder from your phone.
So now I have two ways to transfer photos between my phone and computer (that is whenever the KDE issue gets fixed).
1 Like
hi! for me, the most convenient way to transfer files between my devices is localsend. i’ve been using it for like 2 years now. unlike samba or nfs, it’s available on all platforms, so i can send files over to my windows laptop as well, and between the phones too. it’s super easy and does not need any additional setup (apart from opening the port), so basically:
environment.systemPackages = with pkgs; [ localsend ];
networking.firewall = {
enable = true;
allowedTCPPorts = [ 53317 ];
allowedUDPPorts = [ 53317 ];
};
hope that helps 
p.s. samba on desktop linux has never been reliable, it’s mostly for servers at the end of the day - better to use native desktop tools. btw, if you still prefer seeing folder structure of your phone, maybe you’ll get interested in primitive ftpd. i dunno which phone you’ve got, but on my android 7 tablet it works all the time and is pretty straightforward 
Thanks for the reply!
I tried localsend and used this setup:
Localsend
programs.localsend = {
enable = true;
package = pkgs.localsend;
openFirewall = true;
};
1 Like