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
1 vote
0 answers
211 views

Best practice to mimic a linux rootfs without root permission on an existing system

I have access to a user account of a ubuntu server. However it's really inconvenient to work without root permission (which means that cannot install packages) and I am more familiar with archlinux ...
Yutsing's user avatar
  • 11
0 votes
2 answers
63 views

How does su detect fakeroot?

If I run su, it asks for the password of the target user. If i run it as root, it does not ask for a password. But if I run it in fakeroot, how is it possible that it will ask for a password? Should ...
jp_'s user avatar
  • 27
1 vote
1 answer
293 views

debootstrap --second-stage with fakechroot fails on docker (/lib/ld-linux-armhf.so.3: No such file or directory)

I am trying to set up a foreign chroot in a docker container. Excerpt from the script: apt-get -y install debootstrap fakechroot fakeroot qemu-user-static binfmt-support mkdir -p $CROSS_ROOT ...
user149408's user avatar
  • 1,255
1 vote
2 answers
1k views

Applications of fakeroot and chroot

Why are there two utilities chroot and fakeroot when both can fake a privileged access to the user?
Franc's user avatar
  • 289
0 votes
2 answers
463 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 ...
Plasma's user avatar
  • 121
0 votes
1 answer
451 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"...
finefoot's user avatar
  • 3,080
1 vote
1 answer
191 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) ...
pts's user avatar
  • 1,061
6 votes
2 answers
2k 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 ...
Sabin Harnagea's user avatar
0 votes
1 answer
1k 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 ...
Bret Joseph's user avatar
0 votes
1 answer
633 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-...
student's user avatar
  • 18.4k
18 votes
3 answers
9k 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 ...
ng.newbie's user avatar
  • 1,175
1 vote
0 answers
129 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. ...
oioioi's user avatar
  • 33
1 vote
1 answer
2k 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 ...
Zoltan's user avatar
  • 476
2 votes
3 answers
3k 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 ...
Mephisto's user avatar
  • 1,077
3 votes
1 answer
694 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> #...
Stefan Majewsky's user avatar
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 ...
Florian Margaine's user avatar
11 votes
3 answers
9k 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, ...
Petr's user avatar
  • 1,654
0 votes
1 answer
532 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 --...
Jodka Lemon's user avatar
  • 3,183
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 ...
x-yuri's user avatar
  • 3,373
1 vote
0 answers
844 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=...
0xC0000022L's user avatar
  • 16.6k