An open API service indexing awesome lists of open source software.

https://github.com/prthd/secure-file-system

A secure multi-user file system with end-to-end encryption, HMAC-based integrity verification, and Unix-style permission control. Features bcrypt-authenticated logins, group-based collaboration, and a command-line interface for secure file operations on untrusted storage.
https://github.com/prthd/secure-file-system

access-control bcrypt cli cryptography encryption fernet-encryption filesystem hmac-sha256 integrity python secure-storage security unix-permissions

Last synced: 4 months ago
JSON representation

A secure multi-user file system with end-to-end encryption, HMAC-based integrity verification, and Unix-style permission control. Features bcrypt-authenticated logins, group-based collaboration, and a command-line interface for secure file operations on untrusted storage.

Awesome Lists containing this project

README

          

# Secure File System (SFS)

A secure file system with encryption, access control, and integrity verification. Supports multi-user groups, Unix-like permissions, and a CLI for secure file operations.

---

## ๐Ÿ“‚ Project Overview

The **Secure File System (SFS)** is a command-line based file management system designed for untrusted environments. It integrates robust cryptographic techniques with Unix-style permission controls to provide secure multi-user file operations.

Key security pillars include:

- ๐Ÿ”’ **Confidentiality**: File names, contents, and metadata are encrypted.
- ๐Ÿ›ก๏ธ **Integrity**: HMAC-based tamper detection alerts users of unauthorized modifications.
- ๐Ÿ”‘ **Access Control**: Role-based access with support for user/group/other permission levels.
- ๐Ÿ‘ค **Authentication**: Secure password handling using bcrypt hashing.

---

## ๐Ÿ‘จโ€๐Ÿ’ป Team

**Group Name**: The ByteKnights

- Het Bharatkumar Patel (SID: 1742431, CCID: hetbhara)
- Parth Dadhania (SID: 1722612, CCID: pdadhani)

---

## ๐Ÿš€ Features

- โœ… Encrypted file and directory names & contents (Fernet AES)
- โœ… CLI-based interface with commands like `login`, `mkdir`, `cd`, `ls`, `touch`, `cat`, `echo`, `mv`, etc.
- โœ… Unix-like permission model (`user`, `group`, `all`)
- โœ… Integrity verification with SHA-256 HMAC
- โœ… Secure password storage (bcrypt)
- โœ… Admin capabilities for creating users and groups
- โœ… Corruption alerting for external file tampering

---

## ๐Ÿงฐ Technologies Used

| Category | Technology/Tool |
| --------------- | ----------------------- |
| Language | Python |
| Encryption | `cryptography` (Fernet) |
| Integrity Check | HMAC (SHA-256) |
| Authentication | `bcrypt` |
| Data Storage | Encrypted JSON files |
| Version Control | Git + GitHub |
| Automation | `run.sh` bash script |

---

## โš™๏ธ Setup Instructions

### ๐Ÿ”ง Requirements

- Python 3.8 or above
- Git / Bash-compatible terminal (Linux/macOS/Windows Git Bash)

### ๐Ÿš€ Quick Start

```bash
# Clone the repository
git clone https://github.com/PrthD/Secure-File-System.git
cd Secure-File-System

# Make run script executable (Linux/macOS)
chmod +x run.sh

# Run the app
./run.sh
```

This will:

- Create a virtual environment (if not already created)
- Install dependencies from `requirements.txt`
- Launch the Secure File System CLI

---

## ๐Ÿงช Default Admin Credentials

```bash
Username: admin
Password: adminpass
```

Use this account to create users and groups via the `adduser` and `addgroup` commands.

---

## ๐Ÿ“˜ Example Commands

```bash
login admin adminpass
addgroup team1
adduser alice password123 team1
mkdir secure_folder
touch notes.txt
echo notes.txt Hello world!
cat notes.txt
chmod notes.txt group
logout
```

---

## ๐Ÿง‘โ€๐Ÿซ User Roles

- **Admin**: Can create users/groups
- **User**: Can create/manage personal files and directories
- **Group**: Enables collaborative access via permission settings

---

## ๐Ÿ›ก๏ธ Security Highlights

- All data stored on disk (including filenames) is encrypted.
- HMAC-based integrity check detects tampering from outside SFS.
- External users see only encrypted content, preserving confidentiality.
- Permission checks enforced before all read/write operations.

---

**Happy Securing! ๐Ÿ”**