EnglishFrenchSpanish

OnWorks favicon

fakeroot-sysv - Online in the Cloud

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

This is the command fakeroot-sysv 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


fakeroot - run a command in an environment faking root privileges for file manipulation

SYNOPSIS


fakeroot [-l|--lib library] [--faked faked-binary] [-i load-file] [-s save-file]
[-u|--unknown-is-real ] [-b|--fd-base ] [-h|--help ] [-v|--version ] [--] [command]

DESCRIPTION


fakeroot runs a command in an environment wherein it appears to have root privileges for
file manipulation. This is useful for allowing users to create archives (tar, ar, .deb
etc.) with files in them with root permissions/ownership. Without fakeroot one would need
to have root privileges to create the constituent files of the archives with the correct
permissions and ownership, and then pack them up, or one would have to construct the
archives directly, without using the archiver.

fakeroot works by replacing the file manipulation library functions (chmod(2), stat(2)
etc.) by ones that simulate the effect the real library functions would have had, had the
user really been root. These wrapper functions are in a shared library
/usr/lib/*/libfakeroot-*.so or similar location on your platform. The shared object is
loaded through the LD_PRELOAD mechanism of the dynamic loader. (See ld.so(8))

If you intend to build packages with fakeroot, please try building the fakeroot package
first: the "debian/rules build" stage has a few tests (testing mostly for bugs in old
fakeroot versions). If those tests fail (for example because you have certain libc5
programs on your system), other packages you build with fakeroot will quite likely fail
too, but possibly in much more subtle ways.

Also, note that it's best not to do the building of the binaries themselves under
fakeroot. Especially configure and friends don't like it when the system suddenly behaves
differently from what they expect. (or, they randomly unset some environment variables,
some of which fakeroot needs).

OPTIONS


-l library, --lib library
Specify an alternative wrapper library.

--faked binary
Specify an alternative binary to use as faked.

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

-s save-file
Save the fakeroot environment to save-file on exit. This file can be used to
restore the environment later using -i. However, this file will leak and fakeroot
will behave in odd ways unless you leave the files touched inside the fakeroot
alone when outside the environment. Still, this can be useful. For example, it can
be used with rsync(1) to back up and restore whole directory trees complete with
user, group and device information without needing to be root. See
/usr/share/doc/fakeroot/README.saving for more details.

-i load-file
Load a fakeroot environment previously saved using -s from load-file. Note that
this does not implicitly save the file, use -s as well for that behaviour. Using
the same file for both -i and -s in a single fakeroot invocation is safe.

-u, --unknown-is-real
Use the real ownership of files previously unknown to fakeroot instead of
pretending they are owned by root:root.

-b fd Specify fd base (TCP mode only). fd is the minimum file descriptor number to use
for TCP connections; this may be important to avoid conflicts with the file
descriptors used by the programs being run under fakeroot.

-h Display help.

-v Display version.

EXAMPLES


Here is an example session with fakeroot. Notice that inside the fake root environment
file manipulation that requires root privileges succeeds, but is not really happening.

$ whoami
joost
$ fakeroot /bin/bash
# whoami
root
# mknod hda3 b 3 1
# ls -ld hda3
brw-r--r-- 1 root root 3, 1 Jul 2 22:58 hda3
# chown joost:root hda3
# ls -ld hda3
brw-r--r-- 1 joost root 3, 1 Jul 2 22:58 hda3
# ls -ld /
drwxr-xr-x 20 root root 1024 Jun 17 21:50 /
# chown joost:users /
# chmod a+w /
# ls -ld /
drwxrwxrwx 20 joost users 1024 Jun 17 21:50 /
# exit
$ ls -ld /
drwxr-xr-x 20 root root 1024 Jun 17 21:50 //
$ ls -ld hda3
-rw-r--r-- 1 joost users 0 Jul 2 22:58 hda3

Only the effects that user joost could do anyway happen for real.

fakeroot was specifically written to enable users to create Debian GNU/Linux packages (in
the deb(5) format) without giving them root privileges. This can be done by commands like
dpkg-buildpackage -rfakeroot or debuild -rfakeroot (actually, -rfakeroot is default in
debuild nowadays, so you don't need that argument).

SECURITY ASPECTS


fakeroot is a regular, non-setuid program. It does not enhance a user's privileges, or
decrease the system's security.

Use fakeroot-sysv online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Free Pascal Compiler
    Free Pascal Compiler
    A 32/64/16-bit Pascal compiler for
    Win32/64/CE, Linux, Mac OS X/iOS,
    Android, FreeBSD, OS/2, Game Boy
    Advance, Nintendo NDS and DOS;
    semantically compatible wi...
    Download Free Pascal Compiler
  • 2
    Canon EOS DIGITAL Info
    Canon EOS DIGITAL Info
    Canon doesn�t have shutter count
    included on the EXIF information of an
    image file, as opposed to Nikon and
    Pentax. There�s no official Canon based
    application ...
    Download Canon EOS DIGITAL Info
  • 3
    rEFInd
    rEFInd
    rEFInd is a fork of the rEFIt boot
    manager. Like rEFIt, rEFInd can
    auto-detect your installed EFI boot
    loaders and it presents a pretty GUI
    menu of boot option...
    Download rEFInd
  • 4
    ExpressLuke GSI
    ExpressLuke GSI
    This SourceForge download page was to
    grant users to download my source built
    GSIs, based upon phhusson's great
    work. I build both Android Pie and
    Android 1...
    Download ExpressLuke GSI
  • 5
    Music Caster
    Music Caster
    Music Caster is a tray music player
    that lets you cast your local music to a
    Google Cast device. On the first run,
    you will need to click the arrow in your
    tas...
    Download Music Caster
  • 6
    PyQt
    PyQt
    PyQt is the Python bindings for
    Digia's Qt cross-platform
    application development framework. It
    supports Python v2 and v3 and Qt v4 and
    Qt v5. PyQt is avail...
    Download PyQt
  • More »

Linux commands

  • 1
    4ti2-circuits
    4ti2-circuits
    4ti2 - software package for algebraic,
    geometric and combinatorial problems on
    linear spaces ...
    Run 4ti2-circuits
  • 2
    4ti2-genmodel
    4ti2-genmodel
    4ti2 - software package for algebraic,
    geometric and combinatorial problems on
    linear spaces ...
    Run 4ti2-genmodel
  • 3
    coriander
    coriander
    coriander - control and display dc1394
    camera images ...
    Run coriander
  • 4
    corkscrew
    corkscrew
    corkscrew - Tunnel TCP connections
    through HTTP proxies ...
    Run corkscrew
  • 5
    g.gisenvgrass
    g.gisenvgrass
    g.gisenv - Outputs and modifies the
    user�s current GRASS variable settings.
    Prints all defined GRASS variables if no
    option is given. KEYWORDS: general,
    settin...
    Run g.gisenvgrass
  • 6
    g.guigrass
    g.guigrass
    g.gui - Launches a GRASS graphical user
    interface (GUI) session. Optionally
    updates default user interface settings.
    KEYWORDS: general, GUI, user interface ...
    Run g.guigrass
  • More »

Ad