A secure client-server file transfer system with authentication, resumable downloads, and access control.
- Features
- Prerequisites
- Installation
- Usage
- Configuration
- Security
- Troubleshooting
- Contributing
- License
- 🔐 Secure password hashing (SHA-256)
- 🔄 Resumable file transfers
- 🌐 File visibility options (Public/Private)
- 🔑 Access code protection for private files
- 📊 Transfer progress tracking
- 🖥️ Server administration console
- 🧾 User transaction history
- 👥 Concurrent client support
- Linux environment
- GCC compiler
- SQLite3 development libraries
- OpenSSL libraries
- pthread support
For Ubuntu/Debian:
sudo apt-get install build-essential libsqlite3-dev libssl-devClone the repository: git clone https://github.com/MeegadaVamsidhar/File_Sharing_System_OS.git
Compile the project:
make # Build both server and client
make server # Build only the server
make client # Build only the client
make clean # Remove binariesMakefile Sample:
CC = gcc
CFLAGS = -Wall -Wextra
LDFLAGS = -pthread -lsqlite3 -lcrypto
all: server client
server: src/server.c
$(CC) $(CFLAGS) src/server.c -o server $(LDFLAGS)
client: src/client.c
$(CC) $(CFLAGS) src/client.c -o client $(LDFLAGS) -lcrypto
clean:
rm -f server client./server./client <server_ip>Example:
./client 127.0.0.1/upload <filename> # Upload a file
/download <filename> # Download a file
/list # List server files
/locallist # List local files
/help # Show help menu
- Port: Change
PORTinserver.c(default: 8080) - Max Clients: Modify
MAX_CLIENTSinserver.c - File Storage: Update
files/directory inserver.c
- Download Directory: Modify
DOWNLOAD_FOLDERinclient.c - Buffer Size: Adjust
BUFFER_SIZEfor transfers
- 🔐 Passwords hashed using SHA-256
- 🚫 Input validation during authentication
- 🔏 Access code enforcement for private files
- 🛡️ SQL injection prevention
- 🔍 File integrity checks
- 💼 Basic session management
Security Notes:
- Passwords are never stored or transmitted in plain text
- Access codes are encrypted in the database
- Use only in protected/internal networks (not production-ready)
- For production, add SSL/TLS encryption
sudo apt-get install libsqlite3-dev libssl-dev- Is the server running?
- Are the firewall rules correct?
- Is the server IP valid?
chmod +x server client
mkdir -p files client_downloadsrm users.db # ⚠️ WARNING: Deletes all user data- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature
- Commit your changes
- Push to your branch
- Open a Pull Request
Development Guidelines:
- Use C99 standard
- Maintain consistent code formatting
- Document any new functions
- Test thoroughly
- Keep commits focused and atomic
This project is licensed under the MIT License.