Coder Social home page Coder Social logo

maxwell175 / ssnfs Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 5.0 1.47 MB

Simple Secure Network File System - Coming Soon

License: GNU General Public License v3.0

QMake 0.19% C++ 10.18% CMake 0.11% Makefile 0.01% C 86.51% PHP 2.37% PLpgSQL 0.38% Python 0.26%
filesystem file-sharing network nfs nfs-server nfs-client fuse-filesystem libfuse

ssnfs's Introduction

SSNFS - A Simple, Secure Network File System

Join the chat at https://gitter.im/SSNFS/Lobby

Why?

The reason I started this project is because currently, there is no network file transfer protocol that is:

  • Secure
  • Robust
  • Easy to setup

For example, in the Linux world there is NFS, but it has no security what-so-ever (without any separate tunneling). In the Windows world, there is Samba. Things are a little better here, but it still has no traffic encryption (by default) and may not be trivial to set up.

The goal

This project's goal is to create a simple way to mount a directory located on a server to one or more clients using the most security conscientious way available.

Progress

  • Read only mode (Completed)
  • Read Write mode (Completed)
  • Configuration (Completed)
  • Managment interface (In Progress)

Building

First, clone the repository as well as the submodules: git clone --recursive https://github.com/MDTech-us-MAN/SSNFS.git

Or, if you already cloned the repository, but forgot to include --recursive, just run the following command in the repository directory: git submodule update --init --recursive

Before building, be sure to have Qt5 (qt5-default in Ubuntu) and libssl (libssl-dev in Ubuntu) already installed. For the client, you will also need libfuse2 (libfuse-dev in Ubuntu).

By default the PREFIX is set to /usr/local for release builds or the build directory for debug builds. If you would like to change this, simply add PREFIX=<new path> to the qmake line.

To build both client and server:

mkdir build
cd build
qmake ..
make
sudo make install

To build only server:

mkdir build-server
cd build-server
qmake "CONFIG+=server" ..
make
sudo make install

To build only client:

mkdir build-client
cd build-client
qmake "CONFIG+=client" ..
make
sudo make install

Usage

To set up the server, simply run the server executable with the --init option. This will start an interactive configuration system.

To access the server's web administration panel, just point your web browser to HTTPS port 2050 of the server.

To register a client with the server, run SSNFS-client register <Server Host>:<Server Port>.

Unfortunatly, a complete managment interface is not fully ready yet. It is currently activly being developed and should be ready soon. Until then, there may be some cases where you may need to edit the config.db using a SQLite3 capable editor.

On the client side, simply use the standard mount syntax: SSNFS-client <Server Host>:<Server Port>/<Share Name> <Mount Directory>

Contributing

Please let us know on Gitter what you are working on so we can better coordinate our efforts.

Coding style

This project uses the Google C++ Style Guide

Commit Message Template

Please set .git-commit-template.txt as your commit message template and follow the rules set forth therein. To do so, simply run the following command in the project root directory:

git config commit.template .git-commit-template.txt

Read this post for more info.

ssnfs's People

Contributors

deepakchethan avatar j-javan avatar maxwell175 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ssnfs's Issues

Fix crash when generating server certificate

Server crashes when generating certificate.

Environment:

  • Ubuntu 18.04.1 LTS
  • libssl1.0-dev version: 1.0.2n-1ubuntu5.1
  • openssl1.0 version: 1.0.2n-1ubuntu5.1
  • Qt version: 5.10.1

To reproduce run:
$ path/to/SSNFSd --init

ssnfsd_crash

Add check to make sure the target paths are within the allowed mount directory!

Before executing any of the requests make sure that the target path provided by the client doesn't have any gotchas such as an extra trip to the parent directory of the mount point, or worse the root of the actual server's file system.

Obviously, this shouldn't happen unless there is a serious client-side bug (or the client is actually a malicious attacker).

Create an interactive initialization process.

An interactive server initialization system is urgently needed.

Tentatively, the following are the settings that it must set.

  • Port number to listen on. (Settings table)
  • Private key file path. (Settings table) - should offer to generate.
  • Certificate file path. (Settings table) - should offer to generate.
  • Web Panel install location. Should default to $PREFIX/etc/webpanel. (Settings table)
  • Log location. stdout/stderr or an actual file. Granular controls by log category should be available only in webpanel.
  • Add admin user.

Integrate PKCS#11 into server

Server private key needs to be protected in an HSM. To achieve this, PKCS#11 standard is required.
SoftHSM will be used as a soft implementation of an HSM.

Copying a directory with files of a large size sometimes bugs up the connection.

Tested with a 200GB video file directory. Started failing at around 20-40%.

Error on server side:

unknown:0 - The File Descriptor link in /proc increased in size between lstat() and readlink()! old size: 64  new size: 65  readlink result: QVector(/, D, a, t, a, D, r, i, v, e, s, /, S, t, o, r, e, s, /, M, a, i, n, -, P, C, /, T, e, s, t, D, i, 

Checking if file exists before trying to remove a file

While following the building process. On executing the post-merge script, I get the following error

mv: cannot stat 'SSNFSd/config.db': No such file or directory
rm: cannot remove 'SSNFSd/config.db.old': No such file or directory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.