Skip to content

omar2535/encrypted-secure-fs

Repository files navigation

Encrypted FS

C++ CMake

🪟 Overview

This project is a simulation of a filesystem where all files are encrypetd. Users may use this program as a way to manage their files and directories without having other people know what the contents of the files are (with the exception of the admin).

Currently, the supported commands are:

Command Description
cd Move the directory up or down (IE. cd ..)
pwd Prints the present working directory
ls Lists all files in the current directory
cat Outputs contents in a file
share Shares a file with a user (IE. share myfile.txt bob)
mkdir Creates a directory (IE. mkdir mydir)
mkfile Creates a file with the given filename and contents (IE. mkfile hello.txt hello world!)
exit Terminates the program

There are also admin specific features in addition to the ones presented above.

Command Description
addduser Creates a user with the given username (IE. adduser bob)

⌨️ Getting started

1. Cloning the repository (only once):

git clone https://github.com/omar2535/encrypted-secure-fs.git

2. Installing required libraries (only once):

Ubuntu:

Ubuntu steps are pretty straight-forward

sudo apt-get -y install cmake
sudo apt-get -y install libssl-dev

Apple:

Mac users will need some extra steps to search for the library paths when using cmake

brew install cmake
brew install openssl

ln -s /usr/local/opt/openssl/include/openssl /usr/local/include # link openssl lib to `/usr/local/include`
echo "export OPENSSL_ROOT_DIR=/usr/local/opt/openssl" >> ~/.zshrc
echo "export C_INCLUDE_PATH=/usr/local/include" >> ~/.zshrc
echo "export CPLUS_INCLUDE_PATH=/usr/local/include" >> ~/.zshrc

3. Configuring the project (only once):

git submodule update --init --recursive
mkdir -p build
cmake . -B build              # Configures the cmake project

4. Building the project (run every time you change the code):

cmake --build build           # Compiles and builds the Spotter application

5. Running the application (run when you want to try running the application):

./build/fileserver <keyfile>

🐳 Getting Started (with docker)

If you want to use docker:

sudo docker build -t local/efs_image .
sudo docker run -d --name efs local/efs_image
sudo docker exec -it efs /bin/bash

root@image_id:/efs# ./build/fileserver

⚒️ Development

Visual Studio Code

To set up your environment on visual studio code, follow the steps below:

Contribution

To contribute, create a new branch, make changes, commit and make a pull request.

git checkout -b <my_branch_name>
# Make changes
git add .
git commit -m <my_commit_message>
git push --set-upstream origin <my_branch_name>

🎬 Demo

2023-02-26.21-55-18.mp4