Weird warning when sharing a folder with Samba

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
gene0915
Level 4
Level 4
Posts: 209
Joined: Sun Oct 26, 2014 7:52 pm

Weird warning when sharing a folder with Samba

Post by gene0915 » Thu Aug 29, 2019 8:59 pm

Fresh install of Mint 19.2 Cinnamon... trying to share a folder with Samba.... what does that warning mean? Did some Googling around and couldn't find anything that 100% applied. The share still worked as intended, just wondering if I should worry about that.

Screenshot from 2019-08-29 20-54-39.png

ajgringo619
Level 6
Level 6
Posts: 1386
Joined: Thu Mar 01, 2018 8:36 pm
Location: San Diego, California

Re: Weird warning when sharing a folder with Samba

Post by ajgringo619 » Thu Aug 29, 2019 9:44 pm

I don't think the share name can have spaces. Change it to something like Home-Movies.
Mint 19.2 XFCE
kernel 4.15.0-64-generic
AMD FX-8350 Eight-Core w/16 GB RAM
Nvidia GeForce 960 w/2GB RAM (435.21)
Image

altair4
Level 19
Level 19
Posts: 9690
Joined: Tue Feb 03, 2009 10:27 am

Re: Weird warning when sharing a folder with Samba

Post by altair4 » Fri Aug 30, 2019 7:12 am

I can reproduce this error message.

I created a folder ( as sudo ) under /media/tester/Home Movies, made tester the owner, then tried to share it:
MintUsershare1.png
MintUsershare1.png (5.08 KiB) Viewed 103 times
Then I created a new folder at /media/tester/HomeMovies - eliminating the space, made tester the owner, tried to share that:
MintUsershare2.png
MintUsershare2.png (4.77 KiB) Viewed 103 times
In both cases the share despite the error message was created successfully:
tester@vmint192cinn:~$ net usershare info --long
[HomeMovies]
path=/media/tester/HomeMovies
comment=
usershare_acl=Everyone:R,Unix User\tester:F,
guest_ok=n

[Home Movies]
path=/media/tester/Home Movies
comment=
usershare_acl=Everyone:R,Unix User\tester:F,
guest_ok=n
It's caused by Mint forking how Ubuntu / Gnome creates shares from the file manager - called a samba usershare. It's also why your googleing never got an answer since this change to usershare is unique to Mint. The code that made that happen is at: https://github.com/linuxmint/nemo-exten ... mo-share.c

It's a legitimate warning in that you need to make sure that the permissions along the path to the target shared folder allows access to the samba client user.

Side note: Here is where I think this is actually a bug. In this particular case where the shared folder is under /media/username the way around the "permissions along the path" problem is to add a parameter in smb.conf that changes the identitiy of the client user so that it does have permissions. If I do that in Mint the warning persists because Mint doesn't take into account how samba itself is configured.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

Post Reply

Return to “Other networking topics”