Questions tagged [fakeroot]

The original version `fakeroot` uses `LD_PRELOAD` to coerce child processes that expect to run as superuser (root) into thinking they get to run as superuser. A rewrite based on `ptrace` exists, named `fakeroot-ng`.

Filter by
Sorted by
Tagged with
0 votes
2 answers
162 views

Applications of fakeroot and chroot

Why are there two utilities chroot and fakeroot when both can fake a privileged access to the user?
  • 177
0 votes
0 answers
57 views

junest proot fakeroot doesn't work

I have a problem with junest p on a remote computer, where I log in via ssh. When I want to run for example sudo pacman -Syy, I get the following error: fakeroot: preload library `libfakeroot.so' not ...
  • 121
0 votes
2 answers
125 views

Passing variables and functions through fakeroot

I want to use fakeroot for a project, but the project has lots of functions and variables that I need to pass through to fakeroot. #!/bin/bash myVar="foo" function testFunction() { echo ...
  • 121
0 votes
1 answer
208 views

How to temporarily leave fakeroot environment

To run some tests, I want to revoke write permissions for a folder. This is a minimal example: $ mkdir test $ chmod a-w test $ touch test/test || printf '%s\n' "write permissions successfully revoked"...
  • 2,056
1 vote
1 answer
101 views

Do file writes as in-memory fake on Linux [duplicate]

I'd like to run a Linux process in a fake-write environment where all file writes (with the write(2) system call) are redirected to an in-memory cache, and subsequent reads (of the same region only) ...
  • 951
5 votes
2 answers
1k views

Issue with changing permissions with fakeroot

I don't understand why the permission does not change for a user when I run the chmod command with fakeroot. Initially, the file has these permissions: -rwxr-xr-x a.txt* When I try to change the ...
0 votes
1 answer
829 views

How do I make PKGBUILD to install to fake root before makepkg builds

I have a tree which I need to install with a foder named /usr. This folder exists in src folder. Now I need to write a function in PKGBUILD that installs to the fakeroot before the *.pkg.tar.gz is ...
0 votes
1 answer
521 views

Permission problem with equivs-build

I am trying to install a vanilla texlive 2018 distribution on a ubuntu 16.04 machine following this guide: https://tex.stackexchange.com/questions/1092/how-to-install-vanilla-texlive-on-debian-or-...
  • 17k
18 votes
3 answers
8k views

How fakeroot is not a security breach in Linux?

After reading some pretty nice answers from this question, I am still fuzzy on why you would want to pretend that you are root without getting any of the benefits of actually being root. So far, what ...
  • 943
1 vote
0 answers
117 views

Fakeroot on macOS tries to delete system directories

I’m having a problem with fakeroot on macOS. I created a pacman fork. When I’d like to delete a package, pacman tries to delete /usr/ instead of a subdirectory. On Linux, it is working fine, though. ...
  • 33
1 vote
1 answer
1k views

How to avoid running make as root in the last step of installing an application from source? [duplicate]

I am always reluctant to run make install as root as the last step of installing an application from source. After all, it allows executing arbitrary code form the Makefile. It has already happened to ...
  • 444
2 votes
2 answers
2k views

How to run old 32 bit linux software in a container inside a modern 64-bit distribution

I need to create a container to run an old proprietary software that used to work in my old 32 bit computer with Ubuntu 8.04. I have been adapting this software in successive OS upgrades by linking ...
  • 1,037
3 votes
1 answer
618 views

Within fakeroot, why does chown return EPERM even though it succeeds (but then again it didn't)?

I've been running into bizarre behavior when using chown(2) within a fakeroot environment. The following minimal program illustrates the issue: #include <fcntl.h> #include <stdio.h> #...
5 votes
2 answers
2k views

fakeroot cdebootstrap: Failed to unshare: Operation not permitted [duplicate]

On Debian, when running: $ fakeroot cdebootstrap stable /tmp/foo cdebootstrap downloads the packages, but when it has to extract them, I get this error: E: Failed to unshare: Operation not ...
10 votes
3 answers
8k views

Is it possible to run debootstrap within a fakeroot environment?

I have a script that prepares an installation image by running debootstrap, does some modifications on the files and then copies the files to a disk image backed up by a file. This works under root, ...
  • 1,584
0 votes
1 answer
432 views

fakeroot make-kpkg buildpackage

When I run make-kpkg --initrd buildpackage with concurrency_level set to 17, all cores are at 100% according to gnome-system-monitor, when running the cc1-jobs. When I run fakeroot make-kpkg --...
  • 3,053
3 votes
1 answer
2k views

dh_install: libnanomsg-dev missing files (usr/lib/*/lib*.a), aborting

I'm trying to backport libnanomsg-dev from jessie to squeeze and following this tutorial. Here's what I get: $ fakeroot debian/rules binary ... dh_testroot -O--parallel dh_prep -O--parallel ...
  • 2,963
1 vote
0 answers
761 views

fakeroot-ng with debootstrap variant fakechroot hangs on makedev

So I am trying to bootstrap a Ubuntu as unprivileged user on Ubuntu. The little script I am using is: #!/usr/bin/env bash DEBARCHIVE_URL="http://localhost:3142/de.archive.ubuntu.com/ubuntu/" LANG=...
  • 15.5k