Page 1 of 1

Sharing a folder Mint Mate 19

Posted: Fri Jul 13, 2018 5:55 am
by sersha
After the installation of Linux Mint Mate 19, sharing is not enabled by default.
Solution:
# # if samba not installed, then:
sudo apt install samba

# # after that
sudo apt install caja-share

# # caja-share is for Mint Mate, use appropriate versions for other env
# # now folder /var/lib/samba/usershares is absent, create it

sudo mkdir /var/lib/samba/usershares
sudo chgrp sambashare /var/lib/samba/usershares
sudo chmod 1770 /var/lib/samba/usershares

# # reboot, then right-click on a folder, select Sharing Options etc. Done!

Re: Sharing a folder Mint Mate 19

Posted: Fri Jul 13, 2018 7:15 pm
by catweazel
sersha wrote:
Fri Jul 13, 2018 5:55 am
sudo mkdir /var/lib/samba/usershares
Why on earth would you put a share inside /var/lib?

Good grief.

Re: Sharing a folder Mint Mate 19

Posted: Sat Jul 14, 2018 7:08 am
by altair4
/var/lib/samba/usershares is where samba places share definitions when the share is created though file manager which caja-share in MATE facilitates.

Re: Sharing a folder Mint Mate 19

Posted: Mon Sep 03, 2018 9:57 am
by cyberschelm
This worked like a charm, thanks for sharing.

After executing the commands above my Windows 7 machine was able to connect to the shared Public folder on my fresh install Linux Mint 19 Mate machine, but my Mint machine could not connect to the Public folder I had created and shared on my Windows 7 machine. I found that 2 things were needed to make this happen:

# # Set a password for samba:
sudo smbpasswd -a your_username

# # Limit the protocols for samba:
xed admin:///etc/samba/smb.conf

And in the global settings, below the line 'workgroup=WORKGROUP', add the line:
client max protocol = NT1

then reboot.

After this you can use 'browse network' in caja to go to the windows machine and open the share.

My Windows 7 machine's network is set on "public" and it's advanced share settings are on "Turn ON password protected sharing", so I got a "Password required" popup window upon first connection. On more relaxed share settings in Windows 7 this popup might not appear, I did not try that.

Fill out:
username: your_windows_username
domain: your_windows_workgroupname
password: your_windows_user's_password

and choose between:
Forget password immediately
Remember password until you logout
Remember forever

I chose remember forever to be done with it until Mint 20 comes out.

From hereon the Public folder I shared on my Windows 7 machine was accessible from Linux Mint.

I realize that this is technically outside the scope of the tread, but it's only 2 little extra things to do to have it working both ways so I thought it usefull to post it regardless.

Re: Sharing a folder Mint Mate 19

Posted: Thu Jun 13, 2019 5:14 am
by DoubleA
First of all I would like to thank you for the awesome tips. However this instructions only works for shared folder inside the "Home" directory. When I try to share a folder on other drive on the Linux Mint Mate 19.1 64-bit machine, the Windows 7 machine will spit out error about permission etc. :(
I am currently in the midst to migrate from Windows 7 with total 11 HDD containing data and I need a way to share multiple folders residing in those HDDs. Any instructions will be much appreciated.

Re: Sharing a folder Mint Mate 19

Posted: Thu Jun 13, 2019 10:29 am
by altair4
What is the full path to the folder being shared?

What you are describing happens when you mount something to /media/your-user-name/XXX.

One way around this is to edit /etc/samba/smb.conf and right under the workgroup = WORKGROUP line add this one:

Code: Select all

force user = your-user-name
Then restart smbd:

Code: Select all

sudo service smbd restart
If your path is something different you need to show people here how you are set up. THe output of the following will tell them that:

Code: Select all

net usershare info --long

Re: Sharing a folder Mint Mate 19

Posted: Sat Jun 29, 2019 3:05 am
by sdet00
Gosh this is needlessly complicated. Is there really no easier way to share a folder via SMB?

Re: Sharing a folder Mint Mate 19

Posted: Mon Sep 23, 2019 1:24 pm
by lewtwo
sdet00 wrote:
Sat Jun 29, 2019 3:05 am
Gosh this is needlessly complicated. Is there really no easier way to share a folder via SMB?
AMEN !!!