Questions tagged [chroot]

A chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children. A program that is run in such a modified environment cannot name (and therefore normally not access) files outside the designated directory tree.

Filter by
Sorted by
Tagged with
0 votes
1 answer
16 views

Subprocess launched inside a chroot created on a codespace with debootstrap fail with /dev/fd/62: No such file or directory

My goal is to standup a chroot with the basic Unix tool-set (bash, cp, touch, cat, etc) and any necessary dependencies need to run apt get inside a codespace. Using debootstrap gets me close. The ...
user avatar
1 vote
1 answer
45 views

chroot as unpriviledged user leads to 'Permission denied' trying to run any binary

I have a chroot root containing some static binaries on an ARMv7l platform (Kobo eReader, see InkBox OS project), namely BusyBox. chrooting as root works fine: kobo:/kobo/mnt/onboard/onboard/.apps/...
user avatar
0 votes
2 answers
42 views

Applications of fakeroot and chroot

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

Can you use ostree to manage chroots?

I've recently started managing a personal server running a fedora derivative. I really like the idea of ostree, but toolbox seems to get in the way more than I'd like for the tasks I'm working on. ...
user avatar
  • 1
0 votes
0 answers
69 views

Automatically execute `nix-user-chroot` when I start a terminal session (Steam Deck)

I am running Arch Linux on the Steam Deck. Steam Deck has a read only root file system which forces you to use Flatpak, or else to make the file system writable at the expense of wiping out, say, ...
user avatar
1 vote
0 answers
33 views

How to re-enable the `enable` command?

As part of a script to set up a restricted user, I ran the enable -n enable command. For testing purposes I would like to undo that command but I can't find any documentation on how to do so. I know ...
user avatar
  • 131
0 votes
1 answer
52 views

Unshare with overlayfs results in permission denied with su

I am trying to setup 'rootless' containers by hand, with just unshare and mounting overlayfs. Currently, I can unpack a rootfs tarball, setup a /tmp and /proc mount, and pivot_root/chroot into it ...
user avatar
1 vote
0 answers
58 views

chroot with mounts in unprivileged container

How can I create a mount inside a Docker container as root but without --privileged mode? The purpose is getting a chroot with /proc, and /dev mounted inside a container. I can do so with chroot and ...
user avatar
  • 111
0 votes
0 answers
68 views

Can't Chroot into archlinux

I have Installed the generic aarch64 rootfs to an sdcard , and have placed It inside my phone and am trying to chroot into it - via a superuser adb shell , by running busybox chroot /data/local/mnt /...
user avatar
0 votes
1 answer
174 views

Command not found when In chroot

Im currently Porting Arch Linux to My phone and I am trying to set up the rootfs properly - have it installed to an external scdard and am using busybox to chroot into it with busybox chroot /data/ ...
user avatar
0 votes
0 answers
37 views

Bind mount across mount namespaces with disjoint roots

I want to bind-mount the root of one mount namespace as a subdirectory of another mount namespace's root. I'm having two problems doing so: How to refer to one root from a process in the other root ...
user avatar
0 votes
1 answer
83 views

Restrict linux process write permission to one folder

I want a process (and all its potential children) to be able to read the filesystem according to my user profile but I want to restrict that process's write permission to only a set of pre-selected ...
user avatar
0 votes
1 answer
56 views

Mismatching kernel versions during installation inside chroot

I'm trying to install Artix on a QEMU virtual machine through an automated script i've wrote, in one of the latest installation steps, where i setup Rootless Docker, it's required to enable the ...
user avatar
1 vote
1 answer
116 views

SSHFS automount fstab with RSA Keypair asking for password

I have a problem. I added a SSH Server to mount to my server. I added the following line to /etc/fstab. sshfs#user@server.com:/home/hd03_00_backup_server/ /mnt/server_backup fuse.sshfs IdentityFile=/...
user avatar
1 vote
1 answer
64 views

Which tool to build a RPM inside a chroot?

I'm using pbuilder to build my binary package for Debian. pbuilder creates a chroot environment, installs all the packages declared as required for the build, and then builds the binary .deb packages ...
user avatar
1 vote
0 answers
28 views

Empty executables after creating bind mount

I've created a bind mount in /tmp/test which I then use to establish a chroot jail. For example: mount --bind -o ro /usr/bin/ /tmp/test chroot /tmp/test /some_executable This seems to work fine - most ...
user avatar
0 votes
0 answers
76 views

USB devices in android, without a module in the android kernel

I have a rather strange theoretical question. For example, when I connect a USB device to my Linux AMD64 PC, the functionality of this USB device depends on the presence of the corresponding module in ...
user avatar
0 votes
1 answer
110 views

Trouble installing packages in a fresh Ubuntu chroot

I created a chroot using the instructions here, substituting focal for lucid. Now I'd like to start installing packages, starting with Python, but I'm not sure what kind of setup I need to perform ...
user avatar
  • 101
0 votes
1 answer
233 views

How to change dconf settings in chrooted mode via terminal?

I used dconf write and gsetting set, they worked on booted GUI desktop system. I tried to run them in a script in chrooted environment and got errors. Web search found QAs for similar errors: Error ...
user avatar
0 votes
1 answer
178 views

How to use parted in script mode to create 3 partitions

Trying to create an installation script for a from-base linux distribution. The first partition I would like to create is a 1G /boot The second should be a variable sized swap partition (current RAM*...
user avatar
3 votes
1 answer
56 views

Accessing directories outside of chroot jail

I'm setting up an SFTP server that several different clients will use. My main issue is that it's absolutely crucial that employees of one client DO NOT see even the directory names of other clients' ...
user avatar
  • 31
1 vote
1 answer
263 views

Start Desktop Environment From Chroot

Is it possible to start a desktop environment entirely in systemd-nspawn or chroot? I want to be able to boot to a console, then optionally enter a chroot and launch Gnome or another desktop ...
user avatar
4 votes
1 answer
193 views

Why if [ -d "dir/proc" ] true when ls "dir" gives total 0 (might be chroot / proc related)?

I was making liveUSB iso file, doing many mounts, plus chroot script having mount -t proc proc /proc in the script (chroot is a new thing for me, I noticed the issue when I was ding some "...
user avatar
0 votes
1 answer
56 views

Slackware(64) 14.2 + chroot + xfce4-session + audio + (NV-)GLX?

Just to make it easier to mount my Slackware 14.2 Installation, I put it on another partition (it's 32 Bits 100% real native). I can start xfce4-session like root user (but that is not the thing I ...
user avatar
  • 29
0 votes
1 answer
106 views

StartX fail in chroot

I have Debian in my sdcard(as parition) and I mount it to my Android using Linux Deploy(it is an app that creates chroot environment). So,what is the problem? Problem is about startx. I want to ...
user avatar
0 votes
0 answers
79 views

Executing chroot commands inside a bash script with variables

I have a long bash script that I am customizing for a Linux installation using debootstrap. This is necessary as the setup (encryption, caching, etc.) is fairly unusual, and cannot be handled by the ...
user avatar
1 vote
1 answer
988 views

mount: proc/: mount point does not exist

I recently messed up my Linux system. So then I made an Arch Linux Live USB to chroot into my distro (parition: /dev/nvme0n1p4) I typed the following commands: sudo mkdir /mnt/mydisc sudo mount -o ...
user avatar
  • 15
2 votes
2 answers
282 views

man returns execve: No such file or directory in chroot jail

I created a chroot jail and copied multiple binaries and their corresponding libraries to the relevant subdirectories. Example: cp -v /usr/bin/edit /home/jail/usr/bin ldd /usr/bin/edit linux-...
user avatar
  • 103
1 vote
1 answer
153 views

Is there a way to chroot into 32bit system from 64bit host?

I have a 64bit Debian system running on my laptop. I wanted to chroot into a RasPiOS system (Raspberry Pi OS), but this OS is only 32 bit. When I try to chroot I get the following error: # chroot /...
user avatar
0 votes
0 answers
19 views

How to execute a binary file without execute permissions in chroot (without chmod) [duplicate]

I have a shell access to a chroot environment with limited linux functionality. I created a binary file with printf: printf '\xB4\xFF\xFF\x78\x00\x00\x00\x00\x46...' > bin.file Now i want to ...
user avatar
  • 131
1 vote
0 answers
123 views

No OpenGL on amd64 chroot on Arch Linux ARM

I am on Arch Linux ARM, and am running a 64-bit chroot in order to get access to some things that are only x86_64. However, when trying to start yuzu or dolphin-emu, it starts, but the text is not ...
user avatar
  • 111
0 votes
0 answers
37 views

How to bind mount paths once pivot root is done

Background: I am setting up a pivot root environment for my process successfully, using minijail library. This puts my process in its own mount namespace. Problem: Once the process is pivot-rooted, is ...
user avatar
  • 1
0 votes
3 answers
873 views

Can't update grub config inside a chroot [closed]

Edit: I asked for this to be deleted but it was closed instead.. I want to edit my GRUB config for a chrooted BTRFS system (/mnt/arch(/@)). I ran these commands: > sudo chroot /mnt/arch/@/ > ...
user avatar
  • 1
0 votes
1 answer
74 views

Howto log multiple sftpd server's activity which user's chrooted home is on shared NFS?

I have an Ubuntu server with sftpd running where /var/data/chroot/ is an NFS mount from a remote central NFS server, and each sftpd user's chroot home is /var/data/chroot/<username>/ and every ...
user avatar
  • 31
1 vote
0 answers
90 views

Can't create SSH SOCKS tunnel with a chroot'ed user

I'm attempting to set up a SOCKS proxy via ssh with a user in a chroot jail. After creating the tunnel, connection attempts result in: channel 2: open failed: administratively prohibited: open failed ...
user avatar
  • 113
0 votes
1 answer
62 views

Any way of recovering ubuntu after purging Python 3?

I used purging for dealing with errors before but had no idea how integral python is for ubuntu's functioning. I tried chrooting and using the commands for fixing broken installs, autoremoving and ...
user avatar
  • 9
0 votes
0 answers
27 views

Some Domain Users on SFTP do not auto start in the user home folder

I have a question regarding /etc/ssh/sshd_config: I have 2 users: importuser outportuser Both are domain users and are sharing 1 group, AD security group, sftp_uploaders And in /etc/ssh/sshd_config ...
user avatar
0 votes
0 answers
79 views

How to make chrooted SFTP home writable and default to "~"path

My current SFTP chroot setup is like this: User example is chrooted in directory /home/example/chroot/. He is unable to go up in directory tree (his unescapable root is /home/example). How to make ...
user avatar
  • 283
0 votes
0 answers
120 views

How do I use fsarchiver to make a backup of only a particular BTRFS sub volume?

Does anyone know to use fsarchiver to make a backup of only a single BTRFS subvolume ? Will this mechanism work ? 1. Mounted the snapshot in /mnt: mount -t btrfs -o subvolid="id" /dev/sda2 /...
user avatar
  • 893
1 vote
1 answer
246 views

Share proprietary Nvidia Drivers with chroot

Is it possible to allow my chroot to use the same Nvidia Drivers as my host os? Drivers are proprietary / not included in the Kernel.
user avatar
4 votes
1 answer
277 views

Is there a way to tell if a process is chrooted?

I am still new to understanding chroot. Some packages install their own users (_packagedaemon) and create their own directories (/var/package/). However, I cannot tell if the process is configured to ...
user avatar
  • 423
1 vote
2 answers
78 views

Minimal APT Update

Is there a way to only update the package lists without running all those scripts afterwards? Maybe even "by hand"? My use case: I am trying to install a package via apt and chroot. ...
user avatar
  • 161
6 votes
1 answer
115 views

Setting up vsftp

Beginner Hi, So for a school assignment, I have to set up a FTP server (vsftp) on OpenSUSE. The teacher told us to use a chroot list, but whenever I use a chroot list, all users have full control over ...
user avatar
0 votes
1 answer
737 views

How to continue script commands, functions & variables after chroot?

I have written a BASH script that would prepare and install everything during ArchLinux initial installation. The script would work fine and execute everything successfully until it reaches the arch-...
user avatar
0 votes
1 answer
82 views

su not working inside arch-chroot with dash shell

When i try to do the following inside a dash script: #!/bin/dash arch-chroot /mnt /bin/dash <<- EOF su myuser whoami EOF It simply logs the "root", but when i try to do it ...
user avatar
0 votes
0 answers
35 views

Can loop device slots be reserved at boot for later use?

I'm working with a mounted root file system image in chroot that requires specific loop device numbers, and I need /dev/loop1 through /dev/loopN to be available for use after boot is completed, but ...
user avatar
  • 98
0 votes
1 answer
50 views

Debugging "chroot: failed to load command '<executable_name>'" besides ldd and /proc/<pid>/maps

Trying to run rngd from rng-tools in a chroot environment on Raspberry Pi Zero. Running ldd with the same chroot shows that all dependencies are satisfied: pi@raspberrypi:~/rngd_chroot $ sudo chroot /...
user avatar
  • 109
0 votes
1 answer
263 views

Disable terminal access but keep FTP

I'm using a raspberry pi3 and VSFTPD to share a directory via FTP, which allows a camera to connect to it and transfer photos. I also created a simple user & password and chrooted the directory so ...
user avatar
  • 5
0 votes
1 answer
69 views

chrootable root fs dirs, one mounted at / during boot

Let's say I have a HDD with one partition at /dev/sdb1 with the following contents: % sudo mount /dev/sdb1 /mnt % cd /mnt % ls osA/ osB/ % ls * osA: bin boot/ dev/ etc/ home/ lib lib64 lost+...
user avatar
1 vote
1 answer
1k views

Running a systemd service with RootDirectory= and access /bin binaries

I'm trying to utilize some of the systemd helpers to chroot(2) the process using RootDirectory=. It's a rudimentary Python script that lives under /srv/http that hosts a web server. It has a shebang #!...
user avatar
  • 3,430

1
2 3 4 5
12