EnglishFrenchSpanish

Ad


OnWorks favicon

fakechroot - Online in the Cloud

Run fakechroot in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command fakechroot that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


fakechroot - gives a fake chroot environment

SYNOPSIS


fakechroot [-s|--use-system-libs] [-l|--lib library] [-d|--elfloader ldso]
[-e|--environment type] [-c|--config-dir directory] [-b|--bindir directory] [--] [command]

fakechroot -h|--help

fakechroot -v|--version

DESCRIPTION


fakechroot runs a command in an environment where is additional possibility to use
chroot(8) command without root privileges. This is useful for allowing users to create own
chrooted environment with possibility to install another packages without need for root
privileges.

fakechroot replaces some C library functions (chroot(2), open(2), etc.) by ones that
simulate the effect of being called with root privileges.

These wrapper functions are provided as a shared library libfakechroot.so which is loaded
through the "LD_PRELOAD" mechanism of the dynamic loader. (See ld.so(8))

In fake chroot you can install i.e. Debian bootstrap with debootstrap(8) command. In such
environment you can run i.e. apt-get(8) command to install another packages. You don't
need a special privileges and you can run it on common user's account.

OPTIONS


-l library|--lib library
Specify an alternative wrapper library. The default is libfakechroot.so

-d ldso|--elfloader ldso
Specify an alternative dynamic linker. This dynamic linker will be invoked directly.

-s|--use-system-libs
Use system libraries before chroot's libraries. This might be a workaround if system
dynamic linker can not load libc.so from fake chroot.

Try this setting if you noticed following errors:

$ fakechroot /usr/sbin/chroot /tmp/sarge /bin/true
/bin/true: relocation error: /srv/sarge/lib/tls/libc.so.6: symbol _dl
_starting_up, version GLIBC_PRIVATE not defined in file ld-linux.so.2
with link time reference

$ fakechroot /usr/sbin/chroot /tmp/centos4 /bin/true
Segmentation fault

-e|--environment type
Load additional configuration with environment. This configuration file is a shell
script which is executed before calling command. The script can set additional
environment variables, like i.e.: "FAKECHROOT_EXCLUDE_PATH", "FAKECHROOT_CMD_SUBST" or
"LD_LIBRARY_PATH".

The environment type is guessed based on command name with optional extension removed
(e.g. running gettext.sh loads "gettext" environment file). If command argument is
fakeroot(1) this argument is omitted and next argument is taken as environment type.

The configuration file name is type.env and is searched at $HOME/.fakechroot and
/etc/fakechroot directories.

The default environment type is default and its configuration file name is
"default.env".

The special environment none means that no environment settings are loaded at all.

-c|--config-dir directory
Specify a directory which contains additional configuration for fakechroot. The
default directory are "$HOME/.fakechroot" and "/etc/fakechroot".

-b|--bindir directory
Specify a directory which contains the replacement executables shipped with
fakechroot. Those are script files with the extension ".fakechroot". By default they
are distributed over the "bin" and "sbin" directories in fakechroot's install prefix,
but sometimes a fixed location at build time is not feasible.

[--] command
Any command you want to be ran as fakechroot. Use '--' if in the command you have
other options that may confuse fakechroot's option parsing.

-h Display help.

-v Display version.

EXAMPLES


An example session with fakechroot:

$ id
uid=1000(dexter) gid=1000(dexter) groups=1000(dexter)

$ fakechroot fakeroot debootstrap sid /tmp/sid
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
...
I: Base system installed successfully.

$ fakechroot fakeroot chroot /tmp/sid apt-get install -q hello
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
hello
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 57.4 kB of archives.
After this operation, 558 kB of additional disk space will be used.
Get:1 http://ftp.us.debian.org/debian/ sid/main hello amd64 2.8-4 [57.4 kB]
Fetched 57.4 kB in 0s (127 kB/s)
Selecting previously unselected package hello.
(Reading database ... 24594 files and directories currently installed.)
Unpacking hello (from .../archives/hello_2.8-4_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for install-info ...
Setting up hello (2.8-4) ...

$ fakechroot chroot /tmp/sid hello
Hello, world!

FAKEROOT


fakeroot(1) is a complementary tool which emulates root environment. fakeroot and
fakechroot might wrap the same C library functions, i.e. mknod(2) function. It is
important to start fake environment in proper order. fakeroot should be started inside
fakechroot:

$ fakechroot fakeroot chroot /tmp/sid /bin/mknod /tmp/device c 1 2

SECURITY ASPECTS


fakechroot is a regular, non-setuid program. It does not enhance a user's privileges.

fakechroot should not be used as a tool for enhancing system security i.e. by separating
(sandboxing) applications. It is very easy to escape from a fake chroot environment.

fakechroot should not be run with real root privileges. It might decrease the security of
the system because the fakechroot provides own version of core functions with behavior
depended on some environment variables.

Use fakechroot online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Amidst
    Amidst
    Amidst or Advanced Minecraft Interface
    and Data/Structure Tracking is a tool to
    display an overview of a Minecraft
    world, without actually creating it. It
    can ...
    Download Amidst
  • 2
    qBittorrent
    qBittorrent
    An advanced and multi-platform
    BitTorrent client with a nice Qt user
    interface as well as a Web UI for remote
    control and an integrated search engine.
    qBittorr...
    Download qBittorrent
  • 3
    MSYS2
    MSYS2
    MSYS2 is a collection of tools and
    libraries providing you with an
    easy-to-use environment for building,
    installing and running native Windows
    software. It con...
    Download MSYS2
  • 4
    DOSBox
    DOSBox
    DOSBox emulates a full x86 pc with
    sound and DOS. Its main use is to run
    old DOS games on platforms which
    don't have DOS (Windows 7, 8, 8.1
    and 10 / Linux ...
    Download DOSBox
  • 5
    Xtreme Download Manager
    Xtreme Download Manager
    The project has a new home now:
    https://xtremedownloadmanager.com/ For
    developers:
    https://github.com/subhra74/xdm Xtreme
    Download Manager is a powerful tool t...
    Download Xtreme Download Manager
  • 6
    Clover EFI bootloader
    Clover EFI bootloader
    Project has moved to
    https://github.com/CloverHackyColor/CloverBootloader..
    Features:Boot macOS, Windows, and Linux
    in UEFI or legacy mode on Mac or PC with
    UE...
    Download Clover EFI bootloader
  • 7
    unitedrpms
    unitedrpms
    Join us in Gitter!
    https://gitter.im/unitedrpms-people/Lobby
    Enable the URPMS repository in your
    system -
    https://github.com/UnitedRPMs/unitedrpms.github.io/bl...
    Download unitedrpms
  • More »

Linux commands

  • 1
    4ti2-ppi
    4ti2-ppi
    4ti2 - software package for algebraic,
    geometric and combinatorial problems on
    linear spaces ...
    Run 4ti2-ppi
  • 2
    4ti2-qsolve
    4ti2-qsolve
    4ti2 - software package for algebraic,
    geometric and combinatorial problems on
    linear spaces ...
    Run 4ti2-qsolve
  • 3
    crlupdate
    crlupdate
    crlupdate - Mono Certficate Revocation
    List Downloader and Updater ...
    Run crlupdate
  • 4
    crlutil
    crlutil
    crlutil - List, generate, modify, or
    delete CRLs within the NSS security
    database file(s) and list, create,
    modify or delete certificates entries in
    a particul...
    Run crlutil
  • 5
    gammu-smsd
    gammu-smsd
    gammu-smsd - SMS daemon for Gammu ...
    Run gammu-smsd
  • 6
    gammu
    gammu
    gammu - Does some neat things with your
    cellular phone or modem. ...
    Run gammu
  • More »

Ad