LucidFileSharing

  • Launchpad Entry: kubuntu-lucid-file-sharing

  • Created: 2009-11-23

  • Contributors: rgreening

  • Packages affected: kdelibs5, kdenetwork-filesharing

Summary

Kubuntu does not support simple file sharing for modern releases of samba. The current samba UI for KDE is unmaintained and does not work as expected.

Additionally, it's current focus is to maintain an smb.conf file instead of using the "net usershare" functions to make file sharing easy from a user perspective. This requires administrative rights, for something which should be a basic user function.

This spec will implement "net usershare" functionality, providing users a simple way to share their personal folders.

Release Note

Kubuntu users can now easily share their personal files and folders on their local network.

Rationale

Sharing files and folders is a common user task.

User Stories

Rod needs to provide access to some documents to his co-workers, he uploads these to a shared folder so they may view them.

Mackenzie has some music on a shared folder, and wishes access them from any computer on her network, rather than copy them to each computer.

Assumptions

Old method is no longer relevant, and interested users will have a desire to use the new and simplified approach and not require more advanced options.

Users requiring advanced options will be directed to Samba documentation (man smb.conf) if they wish to make use of any advanced features.

Design

Provided via a KDE Page Plugin for the File Properties Dialog, which provides a way to enable/disable sharing for a particular folder.

This will need to be a self contained Page Plugin, providing only simple Samba sharing (via net usershare).

Implementation

Rip out the current Samba sharing UI in KDE. This interface lives in two places, kdelibs5 and kdenetwork-filesharing. Additionally, we will pull out the NFS sharing UI bits which are tied to the "Share" infrastructure.

Samba would need to be installed for this to work correctly. The user interface should offer to install it the first time that is set up (e.g. when user ticks "Share this folder" option). It will use "net usershare add [options]" to create a share. Additionally, the Samba config will need to be checked to ensure "usershare" is properly enabled, and if not, prompt user for credentials to make the necessary changes. Kubuntu should investigate what Ubuntu does, as the default smb.conf does not seem to have this enabled (usershare max shares is commented out and defaults to 0 which means disabled). The user must be member of group "sambashare". Only the first user on a system is automatically in this group. Kubuntu should check this the first time a user tries to share a folder.

UI Changes

In the Folder Properties dialogue in Dolphin, a "Share" tab offers a "Share this folder" tickbox, "Share Name" and "Share Comment" fields as well as "Allow Others to Write" and "Allow Guest" tickboxes for setting up who can access and modify the folder contents.

Code Changes

The following files/locations are where changes need to be made:

kde4libs-4.x.x/kio/kfile/ - only the files listed below are applicable

  • kfilesharedialog.cpp kfilesharedialog.h

kde4libs-4.x.x/kio/kio - only the files listed below are applicable

  • kfileshare.cpp kfileshare.h kfileshare_p.h knfsshare.cpp knfsshare.h ksambashare.cpp ksambashare.h

kdenetwork-4.3.3/filesharing - everything under this tree needs to be re-worked or removed

Migration

Update Kubuntu Docs to detail new way of creating Shared folders. Given the old method has not been used or supported for many releases, we should not need to detail a migration path other than documenting the new procedures.

Long Term Plans

Re-introduce a sane KControl module for handling more advanced features, and possibly integrate an advanced option into the "Share" tab of folder properties.

Add NFS, WWW (WebDav), other support if warranted.

Samba and Zeroconf integration if appropriate.

Test/Demo Plan

Verify that proper file and user permissions (Read-only and Read-write) work as expected. I.e. Verify Guest access and Allow Read/Write options.

Verify share is advertized and that the folder can be seen on the network.

  • TODO: flesh out the test cases


CategorySpec

Kubuntu/Specs/LucidFileSharing (last edited 2009-12-02 05:39:58 by mail)