Skip to main content

Utility to setup mountable SFTP and WebDAV connections on Linux/UNIX systems.

Introduction

netdrive-connector is a simple PyQt4 wrapper for the existing and standardized way to get SFTP and WebDAV shared folders (remote filesystems) mounted into your local filesystem. Usually a folder inside your home folder. With the optional addition of auto-mounting at desktop login and passwordless login.

It makes it quick and easy to get one of these shared folders up and running without having to know how to set them up manually.

Pros

  • Simple and effective.

  • Uses robust existing technologies (sshfs, davfs2).

  • No unnecessary config files or metadata.

  • Saves learning how to set up these remote filesystems manually.

Cons

  • May inhibit learning of underlying techologies.

Current Limitations

  • The auto unmount at logout is KDE centric (uses ~/.kde/shutdown). Please let me know if there is a logout script for other DE’s / WM’s.

  • No UI localization support (English only).

  • Only available for Linux. Hopefully FreeBSD to follow soon (sshfs only).

  • Makes some assumptions about the system configuration.

Installation Notes

  • Always check in your distributions’ repository first.

  • If no packages are available for your distribution, install distro specific dependencies then install from PyPi (pip).

  • Slackware has a SlackBuild maintained by me (primary developer).

  • I’ll try to add more to the ‘release’ section as I get time and help to package for more distributions.

From PyPi (pip)

Make sure dependencies are installed (see below).

pip install netdrive-connector

From source

Make sure dependencies are installed (see below).

git clone https://github.com/ethoms/netdrive-connector.git
cd netdrive-connector
python setup.py sdist
pip install dist/netdrive-connector-*.tar.gz

From basic rpm package

Make sure dependencies are installed (see below).

Caveats: this will create a very basic rpm package without dependency information.

git clone https://github.com/ethoms/netdrive-connector.git
cd netdrive-connector
python setup.py bdist_rpm
rpm -ivh netdrive-connector-*.noarch.rpm

This may be converted to other packaging systems using ‘alien’. See this Alien How To.

Usage Notes

Any regular user accounts that intend to mount a connection may need additional unix groups ( fuse, sshfs, davfs2). This varies depending on the distribution.

In addition to the main GUI tool, there are command line utilities to add and remove connections. These are as follows:

add-sftp-connector

# add-sftp-connector

Usage (1): /usr/bin/add-sftp-connector username@server_url mount_point
Example  : /usr/bin/add-sftp-connector bill@host1.example.com:/shares /home/bill/Shares
Example  : /usr/bin/add-sftp-connector bill@host1.example.com:22/shares /home/bill/Shares

Usage (2): /usr/bin/add-sftp-connector username@server_url mount_point key
Example  : /usr/bin/add-sftp-connector bill@host1.example.com:/shares /home/bill/Shares key
Example  : /usr/bin/add-sftp-connector bill@host1.example.com:22/shares /home/bill/Shares key

Usage (3): /usr/bin/add-sftp-connector username@server_url mount_point key sftp_password
Example  : /usr/bin/add-sftp-connector bill@host1.example.com:/shares /home/bill/Shares key opensesame
Example  : /usr/bin/add-sftp-connector bill@host1.example.com:22/shares /home/bill/Shares key opensesame
!WARNING!: this method may save your password to the HISTFILE (command history)

NOTE:    : options (2) and (3) will add a local ssh key to the remote authorized_keys for password-less login.

remove-sftp-connector

# remove-sftp-connector

Usage (1): /usr/bin/remove-sftp-connector username@server_url mount_point
Example  : /usr/bin/remove-sftp-connector bill@host1.example.com:22/shares /home/bill/Shares

add-webdav-connector

# add-webdav-connector

Usage (1): /usr/bin/add-webdav-connector server_url mount_point
Example  : /usr/bin/add-webdav-connector http://webdav.example.com:80/shares /home/bill/Shares

Usage (2): /usr/bin/add-webdav-connector server_url mount_point username
Example  : /usr/bin/add-webdav-connector http://webdav.example.com:80/shares /home/bill/Shares bill

Usage (3): /usr/bin/add-webdav-connector server_url mount_point username password
Example  : /usr/bin/add-webdav-connector http://webdav.example.com:80/shares /home/bill/Shares bill opensesame
!WARNING!: this method may save your password to the HISTFILE (command history)

NOTE:    : options (2) and (3) will add an entry to the ~/.davfs2/secrets file for password-less login.

remove-webdav-connector

# remove-webdav-connector

Usage (1): /usr/bin/remove-webdav-connector server_url mount_point
Example  : /usr/bin/remove-webdav-connector http://webdav.example.com:80/shares /home/bill/Shares

Packaging Notes

  • I’m always willing to assist in packaging for as many distros as possible. Create an ‘Issue’ if you need assistance from me.

  • Subject to the distribution and it’s fuse, davfs2, sshfs packages, a user may need adding to additional groups (fuse, davfs/davfs2 etc.). In Slackware, only the davfs2 group is required.

  • An ssh-askpass program should be installed and configured to work with sshfs.

  • At some point in the operation of adding/removing connections, a temporary script is placed in /tmp and given execute permission. After use it is deleted. A regular user will need permissions to do this.

  • WARNING: The webdav connection script ‘add-webdav-connector’ will turn the setuid bit on /usr/bin/mount.davfs.

Dependencies

  • python v2.7 or above (not python 3).

  • PyQt4 v4.8 or above (python-qt4 on debian based distros).

  • ssh-askpass, or a variant of. Tested with x11-ssh-askpass.

  • expect (version 5.x or above should be OK).

  • fuse.

  • sshfs (sshfs-fuse) v2.4 or above recommended.

  • davfs2 v1.4.6 or above recommended.

  • openssh-client.

  • awk, grep, ls, cut, chown, cat, chmod, sed, uname, who.

Note: Either davfs2 or sshfs are not required if that connection type is unused.

Screenshots

netdrive-connector Main Window

https://github.com/ethoms/netdrive-connector/blob/master/screenshots/netdrive-connector1.png

Metadata

Release files for netdrive-connector 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netdrive-connector 1.2
File Size Uploaded
netdrive-connector-1.2.tar.gz 41.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for netdrive-connector 1.2
File Interpreter ABI Platform
netdrive_connector-1.2-py2-none-any.whl Python 2 none any Details

Total release size: 92.1 kB

Release files / netdrive-connector-1.2.tar.gz

Download URL netdrive-connector-1.2.tar.gz
Size 41.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7debc086a66101511a073a482b519fb499d86b860389731dc1da43f11a0c7833
BLAKE2b-256 checksum
How to use checksums
9ae3e410ffcb5d1fef22ec4128c07aa9cb8aa673917a21e379041468ae0119eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / netdrive_connector-1.2-py2-none-any.whl

Download URL netdrive_connector-1.2-py2-none-any.whl
Size 50.3 kB
Tags Python 2
SHA-256 checksum
How to use checksums
63d025a60d45d7458db4cfde1d6d367a67c5c9f62440c5a1cbf506e5743cb3ca
BLAKE2b-256 checksum
How to use checksums
c0a629737161ec2f2940f33ae6355fb1b4b1dd50f3ccbddc9e4de7bdc95d3505
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.3.2

2 release files

This release

1.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page