docs icon indicating copy to clipboard operation
docs copied to clipboard

File sharing recommendations are weak

Open curiousercreative opened this issue 3 years ago • 10 comments

While these instructions work, having only a single public folder shared and only via dav protocol leaves a lot to be desired. Are there any gnome options that create multiple SMB shares with user permissions for example?

curiousercreative avatar Feb 25 '21 02:02 curiousercreative

It is rather simple isn't it? As far as gnome integrated solutions go, Nautilus can create network shares (via samba) that give you more granular control over what is shared and to whom. Its not as straight forward as the integrated sharing feature and requires a bit more familiarity with the system which may be why we didn't add it to the document. I'll see how support and QA feel about adding more sharing options.

bflanagin avatar Feb 25 '21 14:02 bflanagin

@bflanagin I'm not familiar with setting up shares via Nautilus, I'll look forward to some references or additional documentation. Sounds promising to address this concern. FWIW, the webDAV server performance was quite good out of the box, saturated a 1GbE between two pop machines.

curiousercreative avatar Feb 25 '21 14:02 curiousercreative

@curiousercreative

We're considering the addition but want to make sure the solution meets our standards, and right now its a little iffy. So if you have some time please run these commands and let us know the results.

sudo apt install nautilus-share samba

sudo usermod -aG sambashare $USER

Give you system a reboot to make sure everything is running.

Once your logged in open your file manager and right click on any folder. You should see a "Local Network Share" option.

Screenshot from 2021-02-25 10-37-27

Clicking on that option will allow you to setup the share and its permissions.

Issues

On my test computer I can see the host where the share was configured, however I cannot access it by clicking on it. Image for reference:

Screenshot from 2021-02-25 10-43-05

I can manually, go to the share by putting in the entire URL of the share in my case smb://hostname/foldername.

Oddly this isn't always the case.

If you could report back your findings maybe it will help us figure out what the issue is, and more importantly what the fix might be.

bflanagin avatar Feb 25 '21 16:02 bflanagin

Cool, thanks for this. I'll give it a whirl a bit later. I could be mistaken, but I believe the error you're seeing is a result of the SMB server not allowing guest login and/or share listing/browsing. I have one SMB server here where I can click through nautilus and see a share list without error (but unfortunately, I'm never prompted or given the option to authenticate as a user) while other SMB servers here show that same error.

curiousercreative avatar Feb 25 '21 18:02 curiousercreative

After following these instructions, here are my findings:

  1. I don't receive the error you screenschot. Instead, I see just a single share "print$".
  2. I'm able to use nautilus for sharing a folder, however I'm unable to authenticate from a remote machine (no samba user has been created it seems). I didn't test guest login as it's outside my use case.
  3. I'm unable to share the entirety of my home directory with the default share name (home directory name == user name), though I'm able to share it with a different name

    net usershare' returned error 255: net usershare add: share name curiouser is already a valid system user name

  4. After adding a user with smbpasswd -a "$user", all is well. Minimal configuration modifications also shares home directories, fully satisfying my most common use case without the need for nautilus-share GUI.
  5. Nautilus SMB client (gvfs) performance is atrocious. Where the webDAV share saturated 1GbE (114MB/s), the SMB manages about 65-70MB/s. For comparison, a macOS client (10.14.6) manages ~110MB/s.

curiousercreative avatar Feb 27 '21 18:02 curiousercreative

@bflanagin with the above, I might suggest we document three file sharing methods that can be mixed and matched:

  1. webDAV share that is currently documented. Works great when you only need to share a single public folder to GNOME clients
  2. samba install (more flexible, support wider range of clients), how to add users and enable home directory sharing
  3. nautilus-share install and usage for sharing arbitrary folders, public or not

An after thought, we could also document NFS shares as an advanced option. I've got a 10GbE link to an old Mac Pro NAS that I had NFS on as that was by far the highest performing option I found and combined with automounting was the most seamless experience in Nautilus.

curiousercreative avatar Feb 27 '21 18:02 curiousercreative

From my past experience (macOS), SMB is preinstalled and is entirely managed with a GUI (System Preferences > Sharing > File Sharing). If you enable file sharing, user home directories are shared automatically with unix users synced. From this same system preference GUI, you can create arbitrary shares (such as non-boot disks that are direct-attached to the system)

curiousercreative avatar Feb 27 '21 18:02 curiousercreative

The time is coming where I'll be running an NFS server on my Pop!_OS 21.04 Desktop, so if anyone has some links that may be helpful, I may synthesize those into some Pop!_OS specific documentation (after I get it working of course).

curiousercreative avatar Sep 17 '21 14:09 curiousercreative

We are looking into options for an article on networked storage and/or transferring files between devices on the same network.

Some of the software we are considering are:

  • Nautilus mount network drive
  • SSHFS/SFTP - Works with Nautilus, probably the easiest option to configure
  • SMB/CIFS and/or NFS
  • autofs
  • Syncthing
  • Wormhole File Transfer - Website that allows file sharing. Very easy, but requires trust of a free, 3rd party service

Not sure how far down the rabbit hole we want to go with fileshare, but for file server suggestions:

  • Nextcloud
  • TrueNAS

gangwerz avatar Nov 12 '21 21:11 gangwerz

That all sounds pretty good. Might be a stretch goal, but I'd appreciate performance tuning recommendations or resources linked for each method. 10GbE+

curiousercreative avatar Nov 12 '21 21:11 curiousercreative