Sharing a folder Mint Mate 19

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Post Reply
sersha
Level 1
Level 1
Posts: 1
Joined: Fri Jul 13, 2018 5:37 am

Sharing a folder Mint Mate 19

Post by sersha » Fri Jul 13, 2018 5:55 am

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!

User avatar
catweazel
Level 19
Level 19
Posts: 9604
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Sharing a folder Mint Mate 19

Post by catweazel » Fri Jul 13, 2018 7:15 pm

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.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

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

Re: Sharing a folder Mint Mate 19

Post by altair4 » Sat Jul 14, 2018 7:08 am

/var/lib/samba/usershares is where samba places share definitions when the share is created though file manager which caja-share in MATE facilitates.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

cyberschelm
Level 1
Level 1
Posts: 5
Joined: Sun Feb 02, 2014 7:58 am
Location: Netherlands

Re: Sharing a folder Mint Mate 19

Post by cyberschelm » Mon Sep 03, 2018 9:57 am

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.
I am NOT hampered by any knowledge.

DoubleA
Level 1
Level 1
Posts: 5
Joined: Tue Feb 19, 2013 4:22 pm

Re: Sharing a folder Mint Mate 19

Post by DoubleA » Thu Jun 13, 2019 5:14 am

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.

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

Re: Sharing a folder Mint Mate 19

Post by altair4 » Thu Jun 13, 2019 10:29 am

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
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

sdet00
Level 1
Level 1
Posts: 5
Joined: Sat Feb 24, 2018 3:00 am

Re: Sharing a folder Mint Mate 19

Post by sdet00 » Sat Jun 29, 2019 3:05 am

Gosh this is needlessly complicated. Is there really no easier way to share a folder via SMB?

User avatar
lewtwo
Level 3
Level 3
Posts: 159
Joined: Wed Oct 29, 2014 8:33 pm

Re: Sharing a folder Mint Mate 19

Post by lewtwo » Mon Sep 23, 2019 1:24 pm

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 !!!
"Engineering is the art of planning and forethought."
http://www.keywild.com

Post Reply

Return to “Tutorials”