On my main PC (which was on Ubuntu Mate 16.10), I used to be able to share folders through Samba by going in the share tab in the properties. I’ve just reinstalled the OS from scratch and it doesn’t work anymore. I’ve installed caja-share and when I try to setup a shared folder, I get the following error message:
'net usershare' a renvoyé une erreur 255: mkdir failed on directory /var/run/samba/msg.lock: Permission non accordée
net usershare: cannot open usershare directory /var/lib/samba/usershares. Error Aucun fichier ou dossier de ce type
Please ask your system administrator to enable user sharing.
What should I do (and why doesn’t it work automatically)?
It looks to me like you need to give the user trying to initiate the share write access to /var/run/samba/ or set the share up with admin permissions, maybe?
The point of usershares is especially to be able to share folder without admin rights or tweak the samba config. I’m not sure about the permissions on /var/run/samba and/or /var/lib/samba/usershares but that issue never happened before, I don’t know if I should change them manually, to what, and why doesn’t Mate do it as expected. It might also be a missing group but I’m not sure which one either (nor why Mate doesn’t add users to it automatically if that’s the case).
So, there is indeed quite some differences. I assume that the .tdb files are databases containing the sharing info and I’d just need to setup the usershare directory. There are two small issues, though:
I’m not sure what this “T” is instead of an “x” in the permissions flags
I’m not sure of the group, as “whoopsie” is just the name of the group on my new setup that has the same ID as one on the old setup: maybe “samba”?
Thanks for the help but I just managed to fix the problem by… installing the samba package. It creates the usershares dir with the right permissions (the right group name is “sambashare”).
So, I guess there’s a missing dependancy on the caja-share package, as it only installs samba-common, samba-common-bin and samba-libs.
EDIT: turns out there was a bug report on Launchpad already.