Giter Site home page Giter Site logo

linecode / forkfs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from supercilex/forkfs

0.0 1.0 0.0 191 KB

ForkFS allows you to sandbox a process's changes to your file system.

Home Page: https://crates.io/crates/forkfs

License: Apache License 2.0

Rust 100.00%

forkfs's Introduction

ForkFS

ForkFS allows you to sandbox a process's changes to your file system.

You can think of it as a lightweight container: programs still have access to your real system (and can therefore jump out of the sandbox), but their disk changes are re-routed to special directories without changing the real file system.

Installation

Note: ForkFS is Linux-only.

Use prebuilt binaries

Binaries for a number of platforms are available on the release page.

Build from source

$ cargo +nightly install forkfs

To install cargo, follow these instructions.

Usage

Run a command in the sandbox:

$ forkfs run -- <your command>

All file system changes the command makes will only exist within the sandbox and will not modify your real file system.

You can also start a bash shell wherein any command you execute has its file operations sandboxed:

$ forkfs run bash

More details:

$ forkfs --help
A sandboxing file system emulator

You can think of ForkFS as a lightweight container: programs still have access to your real system
(and can therefore jump out of the sandbox), but their disk changes are re-routed to special
directories without changing the real file system. Under the hood, ForkFS is implemented as a
wrapper around OverlayFS.

Warning: we make no security claims. Do NOT use this tool with potentially malicious software.

PS: you might also be interested in Firejail: <https://firejail.wordpress.com/>.

Usage: forkfs <COMMAND>

Commands:
  run
          Run commands inside the sandbox
  sessions
          Manage sessions
  help
          Print this message or the help of the given subcommand(s)

Options:
  -h, --help
          Print help (use `-h` for a summary)

  -V, --version
          Print version

$ forkfs sessions --help
Manage sessions

Each session has its own separate view of the file system that is persistent. That is, individual
command invocations build upon each other.

Actives sessions are those that are mounted, while inactive sessions remember the changes that were
made within them, but are not ready to be used.

Note: weird things may happen if the real file system changes after establishing a session. You may
want to delete all sessions to restore clean behavior in such cases.

Usage: forkfs sessions <COMMAND>

Commands:
  list
          List sessions
  stop
          Unmount active sessions
  delete
          Delete sessions
  help
          Print this message or the help of the given subcommand(s)

Options:
  -h, --help
          Print help (use `-h` for a summary)

forkfs's People

Contributors

supercilex avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.