Sharing a folder Mint Mate 19

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
sersha

Sharing a folder Mint Mate 19

Post 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!
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Sharing a folder Mint Mate 19

Post 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.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
altair4
Level 20
Level 20
Posts: 11426
Joined: Tue Feb 03, 2009 10:27 am

Re: Sharing a folder Mint Mate 19

Post 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.
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 »

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

Re: Sharing a folder Mint Mate 19

Post 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.
altair4
Level 20
Level 20
Posts: 11426
Joined: Tue Feb 03, 2009 10:27 am

Re: Sharing a folder Mint Mate 19

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

Re: Sharing a folder Mint Mate 19

Post by sdet00 »

Gosh this is needlessly complicated. Is there really no easier way to share a folder via SMB?
User avatar
lewtwo
Level 4
Level 4
Posts: 251
Joined: Wed Oct 29, 2014 8:33 pm
Location: Houston, Texas

Re: Sharing a folder Mint Mate 19

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

Return to “Tutorials”