How To - Simple File Sharing in Mint

Write tutorials here
There are more tutorials here
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
User avatar
Level 1
Level 1
Posts: 32
Joined: Wed Jul 11, 2012 7:01 am
Location: Center of the Storm

Re: How To - Simple File Sharing in Mint

Postby PcMojo » Wed Oct 31, 2012 4:03 pm

I went through that checklist yesterday, I went ahead and double checked everything but still have the same problem. Part of the sharing problem might be that as soon as I finished the mint share setups I went to the Vista pc and started the process of enabling client print and file sharing. Maybe Ms and Linux are fighting for control of the network! Now I can access Vista's public folder from Mint, but I still can't get past the logon from Vista to Mint. All I wanted was a way to share files between pc's, and I have that now so I'll probably just undo the Mint changes and use the Vista share. Thanks for all of your help!
Mint 17.3 with Cinnamon on a Dell D620 laptop.

You are free the instant you want to be!

User avatar
Level 1
Level 1
Posts: 23
Joined: Sat Sep 01, 2012 1:44 pm

Re: How To - Simple File Sharing in Mint

Postby Cerule » Sun Dec 30, 2012 4:43 am

I found these instructions very helpful. It's about how to mount a remote SSH folder using SSHFS. Simple, fast and efficient. ... d-and-gui/

Level 18
Level 18
Posts: 8011
Joined: Tue Feb 03, 2009 10:27 am

Re: How To - Simple File Sharing in Mint

Postby altair4 » Sun Dec 30, 2012 8:45 am

Cerule wrote:I found these instructions very helpful. It's about how to mount a remote SSH folder using SSHFS. Simple, fast and efficient. ... d-and-gui/

And you would post that comment in a HowTo about Samba because:

** You didn't know this was a HowTo?
** You wanted to make enemies quickly?
** You wanted to increase your post count?

As far as the last one is concerned I can tell you that increasing your post count has no rewards. I was under the impression that after a certain number of posts I was eligible to win one of these:

Sadly, that was not the case.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

User avatar
Level 3
Level 3
Posts: 171
Joined: Tue Jun 14, 2016 11:46 pm

Re: How To - Simple File Sharing in Mint

Postby ostracized » Sat Oct 22, 2016 10:53 pm

Thanks for the guide. A few suggestions and questions:


1. I recommend start off the guide with instructions on installing Samba before proceeding, considering the sambaless 18 install.
I think I read somewhere that Clem removed Samba in 18 because of the increased startup time. I'd be curious on a "this session only" share guide versus perpetually sharing folders and having to wait on the network to resolve netbios/wins names on every reboot.

2. I would include a section on how to disable printer sharing. Considering the recent IoT hack yesterday I really think it's best practice to disable devices that don't need to belong on the network, even if they're behind the router (because foolish people turn on UPnP and various other dumb things.) I'm seeing this is fairly straightforward but haven't tested this yet as I'm waiting for a gigabit switch for my own testing:

In the [global] section of /etc/samba/smb.conf, write the following:

Code: Select all

load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes

Additionally I'm hoping this works because the syslog is being spammed again by the cups scheduler and even more often by colord. It *might* be gufw rules but colord goes absolutely nuts in the syslog when it can't find/connect to a previously-stored embedded color profile for your printer/scanner/monitor/other device.


1. Back on windows I remember having to manually enable jumbo frames on the network adapters of both machines to transfer very large files otherwise the connection would routinely drop. This was not a default setting on most adapters. Do you know anything about this or are we pretty much at the mercy of whatever network driver is available? And yeah I already saw your guide on setting up a temp local http python server.

2. In your troubleshooting guides you often recommend disabling ufw outright. However, I'm more interested in knowing the exact firewall rule for samba to function. In gufw's report, I'm seeing 2 tcp ports for smbd, 2 udp ports for nmdb, and 2 udp ports for avahi-daemon. But, you don't need to worry about any of that if "allow incoming connections" is selected in gufw because these are local devices right? I seem to recall that "file and printer sharing" was always an exception in the default windows firewall so this never needed tweaking...

3. I'd actually prefer none of my other devices to know I'm sharing anything anyway because I'm used to the advanced sharing in windows by manually typing \\[local IP]\[hiddenShare]$ of the sharing box versus browsing the list of "discoverable devices" in the network pane. Honestly I think that's the best way to do it because no one else can see your device on the network and you need to navigate to the exact share name to see it. This guide is still somewhat relevant for that, right? I'm seeing a commented setting in samba.conf saying wins support = no -- think it's a good idea to uncomment that since we're talking about mint to mint sharing?

4. Also dumb question maybe, but on mint 18, it's probably a good idea to install the samba-recommended dependencies on both machines right?

5. Finally do you know off the top of your head if samba connections are indeed encrypted? I had thought this varied from platform to platform but again, I'm more interested in "less visible" network traffic, even if everything's local. If you don't know, w/e maybe I'll spend another weekend on setting up SFTP or file transfers over ssh.

-thanks for reading.

User avatar
Level 3
Level 3
Posts: 171
Joined: Tue Jun 14, 2016 11:46 pm

Re: How To - Simple File Sharing in Mint

Postby ostracized » Wed Oct 26, 2016 2:36 am

Ok boys, I got some results back after some testing.

1. Don't rely on restarting smbd and nmbd after modifying the .conf file and expecting everything to refresh nicely. I found that a full system reboot on both machines is needed (aka, not a log out/in) to get proper sharing views refreshed in order after a change to the config.

2. Firewall rules. For those of you with custom rules: client needs to allow server (tcp 139, 445) and bcast address (udp 137-138) on the network. (The avahi-daemon might use 2 other udp ports so be sure to check.) The bcast address isn't needed if you want to access shares directly via IP (versus the resolved netBIOS name) -- I found this by accident but was happy about it because see #3 below. (The address to access the shares in caja is simply: smb://[server IP].) Server needs to allow client address and nothing else. For the 98% of you without custom rules, the shares should work (provided gufw is disabled or is allowing incoming connections) -- no modification to ufw is necessary.

3. Disabling printer sharing. I'm happy to report that the code in my previous post works and the syslogs are no longer spammed by constant messages from the cups scheduler and colord. However, enabling the code on the server kills the list of netBIOS names of the devices in your "browse network" view. Here's when you can access devices (and their list of shares) directly by their network IP as explained in #2 above. If you want the netBIOS names back, then don't add the code to the server's config (and suffer the consequences of a spammed syslog on the server side.)

4. Encryption. I did some more research on this and came up with various results. Apparently the default option is "auto" but I haven't found if "auto" == "preferred" and if both machines would indeed use encrypted connections if both are on auto. Thankfully there is an option to force it: smb encrypt = mandatory (again in the [global] section), however using this on the server side gave me the following very, very weird error when setting up any usershare: 'net usershare' returned error 255: net usershare add: cannot convert name "Everyone" to a SID. Access denied. So, I scrapped this option on the server and the client seems fine with it enabled. (I assume through logic here that a "mandatory" encrypted connection would not be made if the server wouldn't allow it -- if not, this is a horrible bug. Really needs to be tested with tcpdump.) It's worth noting here that a mandatory connection should really be made in your setup because various security issues in the recent past have recommended you have this setting enabled as a "workaround for the bug now." P.S. I also found out that connections to cups are not encrypted by default. This really makes the case to disable printers in #3 or set cups encrypt = auto (Default: "no") for at least a minimal TLS handshake to printers (and available printer drivers) on the network. Bad!

5. Transfer speed and folder views. Some momentary drops from hdd ext4 to ssd ext4 (both fde) but hdd ext4 to hdd ntfs (both fde) was solid at ~60MB/s sustained on a 5GB file. So doing a dumb calculation that's about 48% of theoretical on a gigabit connection with the layered encryption overhead, which is pretty good. CPU utilization wasn't bad at all either. Shares are still listed (but not accessible) to the client if the shared folders are moved to the trash and also if the trash is emptied (lol.) Manually f5 refreshing either the list of shares to mount or the network names occasionally hangs caja to the point where you need to force quit network or windows shares -- I can't reproduce the issue but it seems to happen after a reboot and a first view in the network folder -- I'd recommend not manually refreshing in the "Browse Network" view. If you force quit network, the "file operations" transfer speed box will stay blank for the remaining login session (but will still transfer normally.)

Return to “Tutorials”

Who is online

Users browsing this forum: Baidu [Spider] and 4 guests