Samba File Sharing on Fedora KDE 36

I am trying to get file sharing to work on Fedora KDE 36. I have kdenetwork-filesharing and samba installed:

Package kdenetwork-filesharing-22.04.1-1.fc36.x86_64 is already installed.
Package samba-2:4.16.2-0.fc36.x86_64 is already installed.

I created “/home/$USER/Network”. If I right-click on that folder and go to PROPERTIES, I do have the SHARE tab. If I open the tab, I have a message that says:

You appear to not have sufficient permissions to manage Samba user shares.

How do I fix that so I can start sharing folders?

EDIT…

Thanks to u/a1b2c3d4e5_1 and u/zuus on the Fedora Reddit, I have it working now. Here is how in Terminal:

sudo su -
kate

Once Kate opens as root, open /etc/samba/smb.conf and use this:

Close Kate and save the smb.conf file. Type exit to log out of the root account. While still in Terminal:

sudo mkdir /var/lib/samba/usershares
sudo groupadd -r sambashare
sudo chown root:sambashare /var/lib/samba/usershares
sudo chmod 1770 /var/lib/samba/usershares
sudo gpasswd sambashare -a YOUR_USERNAME
sudo systemctl restart smb.service
sudo systemctl restart nmb.service

Reboot your computer.

I still hate having to do this to get Samba working. Can it not be made to work after installing samba and kdenetwork-filesharing?

3 Likes

Also:

sudo setsebool -P samba_enable_home_dirs=1

1 Like

You should never run kate as root. Also there should be no need to.

Kate will prompt you for a password if you don’t have writes to write the file. No root is needed.

In the context of the answer I came up with, it is fine, but you can do it either way I guess.

can you edit/add the link to the reddit thread where the conversation took place?

also, can we get this added to the spin? i think kde neon handles this well when you click the share tab, it will help you set it up. if fedora is against having it all configured for you then the former way is a good compromise.

its closed? someone posted a month ago :man_shrugging:

also, its still relevant. more info can be found here about this working on fedora kde: Issue #109: Consider installing kdenetwork-filesharing + deps by default - SIG - Pagure.io

I think I see the confusion:
d5be54428c8afdc66857e85616ea2272bdc0cb3b.png

At quick glance, it looks like the last comment was on July of 2021 instead of July 21st, 2022. The 19/20/21 are the days, not the year. Given that this is only a few weeks old and not yet solved, we can keep discussing here.

1 Like

for anyone using Nobara or any fedora spin which uses apparmor instead of selinux, check if apparmor is blocking stuff for samba.

The error that i got when i tried to share something via the kde share plugin is:
“net usershare add: cannot convert name “Everyone” to a SID. The transport connection is now disconnected…”

Have a look at your /var/log/audit/audit.log for any apparmor issues for samba/smb.
check if smb stuff is in enforcing mode in apparmor.
$sudo apparmor_status

if it is then set it to complain mode as a temp fix.
$sudo aa-enforce /etc/apparmor.d/usr.sbin.smbd
$sudo aa-enforce samba-dcerpcd samba-bgqd samba-rpcd samba-rpcd-classic samba-rpcd-spoolss

1 Like

You are a life saver! I use Manjaro KDE and it uses apparmor, so it worked!

The only thing is that you said “complain”, but wrote “enforce” in your commands.
I changed it to “complain” and it worked:

$sudo aa-complain /etc/apparmor.d/usr.sbin.smbd
$sudo aa-complain samba-dcerpcd samba-bgqd samba-rpcd samba-rpcd-classic samba-rpcd-spoolss

Thank you!