EasyFileSharing

Revision 13 as of 2007-11-14 12:38:41

Clear message

Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.

Summary

Make file sharing between ubuntu boxes in a lan/wlan easy.

Release Note

TBD

Rationale

To share a directory in ubuntu it is currently required to install either nfs or samba (neither is available in the default install) and to have super user rights.

Use Cases

  • Alice wants to share the photos on her laptop with some friends.
  • Conrad wants his video folder to be visible from the house's shared media PC.

Design

It is important to us that the file sharing solution works with both windows and mac machines out of the box. This means that the other two operating system should see the linux file server in their network browser. This rules out gnome-user-share that provides a WebDAV share and does not require special privileges to setup and leaves pretty much only a samba based solution.

The current solution requires admin privileges to install the initial samba server and to edit shares. It does also ask if samba and/or NFS should be installed.

The next samba upload will support "net usershare" shares, this means that its no longer require to have superuser rights to edit the setup.

If samba is not installed we ask for installing it (but we do not offer NFS anymore). It would be good if we had a samba that is installed by default but does not have a open port unless there is a actual directory to share. This maybe too much magic to hack into samba.

We use "nautilus-share" as the sharing GUI and ensure that it gives a proper message if the user is not able to share because he is not in the sambashare group.

We want to use enable samba password sync out of the box. This requires some PAM magic and the installation of the libpam-smbpass package. All admin users should automatically become part of the sambashare group.

Data Migration/Upgrades

On system upgrades we need to do some magic to generate/update the smb.passwd file. Steve Langasek knows how to do that and offered to help (the only problem with the upgrade solution is that it will only work after the user loged into the account for the first time).

We also need to enable netusershare on upgrades. The samba package should be modified so that it automatically enables it by editing the smb.conf file in the postinst script. The alternative is to just enable netusershare in the samba binary by default.

People in the admin group should be automatically added to the sambashare group as well (add a debconf note).

Test/Demo Plan

TBD

Outstanding issues

Future

  • Empathy is not there yet, likely won't be available by Hardy. Watch out for Empathy and Telephathy for Hardy+1

BoF agenda and discussion

We dicussed the various options:

  • samba/nfs as it is currently used via shares-admin or nautilus-share (it's using "net usershare" from samba http://gentoo.ovibes.net/nautilus-share/mediawiki-1.4.4/index.php/Accueil)

  • gnome-user-share (http://ftp.gnome.org/pub/gnome/sources/gnome-user-share) - requires apache2

  • giver (http://code.google.com/p/giver/) - c# based

  • gshare (http://yimports.com/~cpinto/projects/gnome/gshare) mono + ftp + avahi. in universe. claims to allow sharing to macs, and windows with bonjour installed (or anyone happy to type in ftp://ip:port)

  • woof (http://www.home.unix-ag.org/simon/woof.html) + nice frontend

  • telekinesis (http://techn.ocracy.org/telekinesis/)

  • Want:
    • installed by default, does not open a port, nonadmins can do it, straightforward, shows up in network hsares for WIndows and MacOSX
  • Any custom-sharing system we have needs to be on the other user's computer somehow
    • At moment it asks you if you want to install samba or nfs, but nfs isn't really useful. Should remove nfs option since it's never easy here.
    • NFS requires both server and client to be root, samba only requires server to be root. This gives us a better use case for samba over NFS.
    • Samba is eventually implementing encryption out of the box, which isn't the case for NFS.
    • Users get confused with samba - share the folder, connect from windows, given a username/password dialogue. If they enter linux username/password it won't work.
    • We need to come up with a way to keep in sync the Linux and samba accounts in sync.
    • configuring samba to use pam for authentication requires using clear text passwords between the client and the server. This will likely break compatibility with Windows clients and is no longer supported out of the box by Windows XP and Vista.
    • generate smb passwords by default, even if we don't use them until we install samba. pam_smbpass implements this feature.
      • can do some pam magic to generate these passwords on system upgrades. Steve Langasek can help with this.
      • anytime user types password into any pamaware application it'll do this.
        • In release notes: need to log in as a user to get samba password working. If you upgrade and then never log in with a user you won't be able to share with that user
  • Need to have netusershare enabled by default on samba
    • Need to make sure samba has netusershare enabled after upgrade:
      • Modify the smb.conf file to add the net usershare options from the postinst script.
      • Patch samba to enable net usershare by default.
  • need to review defaults as well (eg guest-accessible share by default as a non-root user). Good time to review a general samba audit...
  • make sure to add people to the right group (admin) will become members of sambashare group.
    • Since changing group settings, need to make a debconf note.
    • make sure that nautilus-share notifies correctly the user if he's not part of the sambashare group.
  • samba does not talk to avahi with mdns at the moment. samba works with mac osx and windows.
    • if we get a better protocol in the future we can always multi-protocol share. ( eg webdav, enlightenment/telepathy, etc.)
    • KDE has some pretty broken samba stuff kde-tools break samba at the moment for sharing samba (old and really nasty) -- KDE 4 job.

Ideas


CategorySpec