Skip to content

Folder Hardener

L33T edited this page Sep 11, 2026 · 2 revisions

A simple script that writes to fstab and tells your chosen folder not to let any binaries execute, increasing the safety of a folder.

Installation

Usage

No special use cases, just run the script.

Removal

To undo the lock put on the chosen directory, you must edit the fstab file, and then unmount the protected folder. This can be done by running:

  1. sudo nano /etc/fstab, then look at the bottom lines, you will see a line that probably looks like: (Directory to folder you chose) (Directory to folder you chose) none bind,noexec 0 0.
  2. Delete this line. If you have isolated multiple folders, delete the line that regards the folder you want to free.
  3. Save to the file by pressing Ctrl+X and then pressing Ctrl+O
  4. Then run sudo systemctl daemon-reload
  5. The final step is to run sudo umount (Directory to folder you chose)
  6. After that the folder is free, and can be deleted or used.

Clone this wiki locally