RMGuard Getting Started
This guide covers the quickest path to install, verify, use, and package RMGuard.
Requirements
- Linux with bash
sudoaccess for installationcoreutilsfor/bin/rmdpkg-debif you want to build a.debpackage
Install From Source
$ git clone -b v1.0.0 https://github.com/Happyuky7/RMGUARD-Linux.git
$ cd RMGUARD-Linux
$ chmod +x scripts/*.sh src/rmguard src/rmguard-cli test/rmguard_test.sh
$ sudo bash ./scripts/install.sh
$ source /etc/profile
Install From Release Package
Use this only if the .deb asset has been uploaded to the release.
$ wget https://github.com/Happyuky7/RMGUARD-Linux/releases/download/v1.0.0/rmguard_1.0.0_all.deb
$ sudo apt install ./rmguard_1.0.0_all.deb
$ source /etc/profile
Verify
$ rmguard --version
$ rmguard --status
$ type rm
type rm may show the friendly alias first. rmguard --status should report that RMGuard is active in the current shell.
Try It Safely
touch /tmp/rmguard-test
rm /tmp/rmguard-test
rm -rf /etc
The /tmp command should work. The /etc command should be blocked.
Bypass Deliberately
Use a bypass only when you know exactly what you are deleting.
RM_GUARD=0 rm -rf /path
rm --no-guard -rf /path
Configure Allowed Top-Level Paths
Edit /etc/rmguard.conf:
ALLOW_TOPLEVEL="/tmp /var/tmp"
Then open a new shell or run:
source /etc/profile
Build v1.0.0 Package
$ bash ./scripts/package.sh 1.0.0
The package is created at build/rmguard_1.0.0_all.deb.
Prepare v1.0.0 Release
$ bash ./scripts/release.sh 1.0.0
Before publishing, verify the version, status command, blocked dangerous paths, allowed temporary paths, changelog, and release notes.