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
0answers
9 views

Can't get postfix to work inside a chrooted environment (Debian 9)

So I'm desperately trying to have postfix daemon working on a Debian 9 chrooted environment. I have a perfectly working configuration on a non-chrooted environment that simply wont work on a chrooted ...
0
votes
1answer
67 views

Debian Buster terminal autologin

I'm repacking a Debian Buster Live ISO. I first unpack the filesystem.squashfs, then chroot in the unsquashed system, make my changes. I want my ISO to autologin (terminal). I've followed this ...
0
votes
1answer
21 views

Error When Porting Debian to RISC-V: vim-tiny : Depends: vim-common (= 2:8.1.2269-1) but 2:8.2.0378-1 is to be installed

Recently I've tried to port Debian on RISC-V and I followed Doc in https://wiki.debian.org/RISC-V. But Some error occurs when creating a riscv64 chroot: (Here's my log) I checked the source in debian ...
1
vote
1answer
58 views

Use bash builtin `bind` command when starting chroot

I have a chroot and I want the chroot to have its own .inputrc file when it starts, and then run a program. I'm used to starting the chroot with chroot <PATH> <PROGRAM_TO_RUN> so I tried ...
1
vote
1answer
29 views

Install Debian Package in chroot

I am building a minimal Debian image with debootstrap, chroot in it and installing grub. Now I need to install some custom self created debian packages. These packages have postinst scripts running ...
-1
votes
0answers
71 views

“ '/boot/initramfs-linux.img' not found ” after Arch Linux update

Failing to boot with this error after an update. The update did have an error and was incomplete, did not do anything about it. Now I have this problem. I'm aware I need to do something to do with ...
0
votes
1answer
33 views

How to resolve chroot. Bin /bash not finding the file or directory

After Windows update, grub bootloader is not showing up. So I have followed the exact steps from https://docs.parrotlinux.org/trbl/trbl-grub/#3-now-you-have-to-mount-the-partitions so the steps ...
0
votes
1answer
17 views

Linux - Jail users into their directories

I want to jail users to their directory in /home I tried to use vsftpd with settings: local_enable=YES chroot_local_user=YES But it doesnt work properly. Users still have access to directories ...
1
vote
0answers
61 views

unknown filesystem grub rescue + chroot doesn't find `/bin/bash`

I was installing hyperledger fabric, on Ubuntu 18.04.3 Desktop, through sudo -E, with bootstrap.sh and of another similar one. But after installation, which seemed gone fine, I'm not able to use ...
0
votes
0answers
91 views

/bin/bash Permission Denied

I'm trying to install GRUB onto a separate partition who's volume shares a Windows installation. After having pulled, configured, and made GRUB, I can't grub-mkconfig. Doing some research, I found: ...
0
votes
0answers
28 views

Problem starting application in chroot directory

I am using debian and i am trying to create chroot directory for firefox. I copy firefox installation files which i get by running sudo dpkg -L firefox, then i copy the shared libraries which i get by ...
2
votes
1answer
69 views

mmdebstrap - how to add gpg?

Here is the dreaded command: sudo mmdebstrap -v --debug --architectures=riscv64 --include="debian-ports-archive-keyring" sid /tmp/riscv64-chroot "deb [trusted=yes] http://deb.debian.org/debian-ports/ ...
-2
votes
1answer
53 views

Why can usermod not modify newly created user? “User does not exist”

Please see the commands I have run trying to modify a user that was just created. # useradd temp # usermod -R /home/temp temp usermod: user 'temp' does not exist The above is odd, so I did a few ...
0
votes
0answers
14 views

CentOS 7 - ChrootDirectory lock sftp-only users into certain folders

I have several users who connect via SFTP only to drop off and collect files and we need to lock each user into their own folder structure without access to the rest of the system. So if we have "...
1
vote
0answers
22 views

Ksh/Bash History for jailed SSH users

How can I keep a history of activities for chroot'd SSH (not SFTP) users? I've tried: created a .sh_history in their home with the proper permissions created a custom $HISTFILE in .profile and in its ...
0
votes
0answers
13 views

If you're going to build a chroot jail, shouldn't you take in only the libraries that the user needs?

Say there's only a couple of commands I want a user to be able to run in a chroot jail. If I include more libraries / commands than they need in the jail, doesn't that create a security issue? And ...
0
votes
1answer
20 views

Program run though chroot jail gives error about encoding?

I'm new to chroot jails; so far I've setup bash using this tutorial, and I've been able to login with the user through ssh secured with a public key. The SSH configuration takes care of running the ...
0
votes
1answer
42 views

ldd and chroot jails when lib64 points to lib?

I'm following this tutorial and on step 2 they look up a bunch of dependency libraries for bash. (I'm assuming you would need to do this for any command that you wish the chroot jail user that is ...
0
votes
1answer
109 views

Using `useradd -R` for chrooting

If I got it right, chroot restricts user's access to a given directory only. Looks like useradd has this option (Debian 10). # useradd --help | grep "chroot" -R, --root CHROOT_DIR directory ...
0
votes
1answer
124 views

grub-mkconfig gives error in chroot environment

I'm trying to make a Debian installation manually from scratch to an external disk within a live Debian CD. I created a Debian Stretch rootfs via multistrap by following the instructions from here (...
3
votes
1answer
127 views

Name resolution does not work in chrooted ArchLinux ARM

What I did Install qemu, qemu-arch-extra, qemu-user-static (AUR) in ArchLinux X86_64. systemd takes care of the binfmt, verified from /proc/sys/fs/binfmt_misc/. Download ArchLinux ARM tarball from ...
1
vote
0answers
42 views

Differences between sudo chroot and chroot

I want to test chroot on my Linux machine. I try the following command: sudo chroot rootfs /bin/bash After that, I can run some commands that defined in rootfs, e.g., ls, mkdir, ... However, if my ...
0
votes
1answer
206 views

Mounting the main fs and chroot

I've mounted the main filesystem just like so: mount /dev/sda1 /mnt/main & chroot'ed to it: chroot /mnt/main but now when i issue the command lsblk i got an error: failed to access sysfs ...
1
vote
0answers
24 views

Is it possible to run users' jobs in chroot environment using Slurm

I'm using Slurm. I want users only to access their own /home/ directory (or directory that they executed their job), ubuntu packages that is installed by the sudo user, and binary files user /bin, ...
0
votes
0answers
29 views

Setting flags with Parted after chroot into an external hard drive gives the “we have been unable to inform the kernel of the change” error

I attempted to run 2 parted commands after chrooting onto an external hard drive, and it gives me these errors: + parted --script /dev/sdb align-check opt 1 + parted --script /dev/sdb set 1 bios_grub ...
1
vote
0answers
52 views

QEMU networking: Host to Guest

I want to connect a host(Debian 10 VM) to a qemu-guest (Debian on aarch64 ARM). I used to debootstrap tool to install a Debian root file system. Then I installed the qemu-user-static device on my host....
1
vote
1answer
316 views

How to build a chroot using docker?

Currently I am able to build an Ubuntu 18.04 32-bit chroot on my developer machine and I wanted to know if I can have the process happen inside a docker container. The process I use: Untar an ...
1
vote
0answers
58 views

authorized_keys in non standard place

authorized_keys in usualy put under .ssh in one HOME's directory. I want to put it in a non standard place like /etc/AK/authorized_keys.archemar I set up sshd_config with a match rule Match user ...
1
vote
0answers
116 views

need a help for change the root chroot /mnt/sysimage in rescue mode

my grub file corrupted and entered to rescue mode. after at shell prompt, unable to change chroot /mnt/sysimage. I tried to ln -s /bin/bash /mnt/sysimage/bin/sh but not changed, copies some libraries ...
0
votes
1answer
342 views

Unable to chroot /mnt/sysimage

I'm working on a RH 7.3 with some issues on the partitions so It doesn't boot properly and goes in emergency mode. I booted the machine from an RH 7.3 iso and I need to extract an sosreport in Rescue ...
0
votes
1answer
115 views

First time installing TinyDNS as a service in a FreeBSD jail - how to do it?

I'm using FreeBSD 11.2 at the moment (likely to move to 12 in a while). I need a tiny authoritative-only DNS server (no lookup or caching needed, under 10 domains and under 10 queries/hr, almost no ...
0
votes
1answer
82 views

How to disallow 'cd ..' for a chroot user

I wanted to restrict a user from accessing files (just outside his directory), so I used chroot, and made the restricted directory as his landing directory upon logging in. But, If I do cd .. that ...
0
votes
1answer
51 views

Chroot, pivot_root with fallback

Consider a small Linux system with network capabilities but with limited storage. So, it can mount a nice fully-customized rootfs via nfs, and it can chroot (or pivot_root) into it. Everything is ...
3
votes
1answer
33 views

hg actions appear to abort on FreeBSD VM: wcache owned by root

I am running a FreeBSD 11.2-RELEASE-p14 build server as a headless VM using virtual box. I ssh -Y into a terminal session. I'm using mercurial version 5.1.1 When I do hg actions, I often get an ...
2
votes
1answer
161 views

Why does `chroot` operation result in error: “bash: /root/.bashrc: Permission denied”?

Why does chroot operation result in error: "bash: /root/.bashrc: Permission denied"? I've been testing chroot for learning purposes, and have encountered the following error, when executing /bin/bash:...
0
votes
0answers
19 views

Cannot properly set user, group, and group list for `chroot`'d command in macOS?

I want to chroot my current user on macOS 10.14.6 for learning purposes. I've read man chroot and understand that the -u, -g, and -G may be used to specify the user, group, and group list of the ...
2
votes
2answers
978 views

How does ChrootDirectory and a user's home directory work together?

I need to create an SFTP only user on CentOS 7. I've read how to do it from various sources. The setup needs to only support a single user with SFTP only access to a single folder. If the user's home ...
1
vote
0answers
84 views

qemu error: mmap stack: Out of memory

I'm trying to use alpine linux aarch64 on my x86-64 linuxhost like this: chroot ./rootfs qemu-aarch64-static /bin/sh I then reach the prompt and start using it. Sometimes (randomly), I get an error ...
1
vote
1answer
66 views

How Does SSH Chroot Works

When I setup chroot directory for SSH user, I set root as owner of this directory and set permissions to 755. Why must these directories be owned by root and have 755 permissions? Why can't the ...
0
votes
0answers
49 views

prepare aarch64 alpine image on x86-64 linux

My goal is to run a simple script on my linux x86-64 to create an pre configured alpine image for aarch64 (rpi3b+). I managed to do it quite successfully for a raspbian, using system-nspawn and qemu-...
0
votes
0answers
71 views

avahi-daemon fails to start in chroot i386 on raspberry p

This is on a raspberry pi 3b+, with raspbian installed (stretch) I have installed a chroot according to this: https://www.novaspirit.com/2019/04/15/run-x86-arm/ After, I installed it, I planned to ...
0
votes
0answers
117 views

Restricted shell within docker container

Some context for my question: I am working on a pty NodeJS server running in docker where I want to provide users connecting to the shell an isolated environment where they can play around with ...
0
votes
0answers
49 views

Kernel panic after installation via tar and chroot

I'm trying to install a slackware system on a PC with a live usb of Ubuntu 18.04. PC has 2 disk: SDD and a Flash memory. At boot Ubuntu see SDD as /dev/sda, Flash as /dev/sdc and Live USB as /dev/sdc....
0
votes
2answers
684 views

Cannot chroot due to “Input/output error” - file and disk seem OK

I am trying to repair a non-booted Arch installation after a computer crash during an update (worst of times). However, chroot fails. Tried this: # mount /dev/sdb2 /mnt/arch # cd /mnt/arch # mount -...
3
votes
0answers
149 views

Make one program use a special resolv.conf

I want to cheat a program to use a special /etc/resolv.conf file, that in turn will force it to use a nonstandard nameserver. The obvious solution is to recreate the whole filesystem except one file ...
2
votes
0answers
113 views

ENOSPC when binding root in chroot

I'm using a custom script to enter a chroot environment (this is not a security jail; it exists so that I can compile and do a few other things with a controlled set of installed packages and tools ...
1
vote
0answers
61 views

Can I interpret Grub2's post-MBR gap?

While setting up a RAW disk image for use in a QEMU-based virtual machine, I became frustrated because QEMU would load GRUB but then GRUB would not load a menu of OSes to boot into. I've come to the ...
1
vote
1answer
138 views

How to run lxc inside of a chroot

I'm trying to run lxc inside of a chroot. $ lxc-start -n instrument --logfile=/dev/stdout lxc-start 20190619141851.659 ERROR lxc_cgfs - cgroups/cgfs.c:cgfs_init:2359 - cgroupfs failed to detect ...
1
vote
1answer
506 views

What is the difference between minimal and full chroot?

While installing a linux distro I found many types of tar.gz files. But I found that, about every distro (For Different architecture) has two files indicated with minimal.tar.gz and full.tar.gz I have ...
1
vote
1answer
526 views

How to run nmap from inside a chroot?

While I am trying to run nmap with privilege this message is showing: nmap: netutil.cc:3285: int route_dst_netlink(const sockaddr_storage*, route_nfo*, const char*, const sockaddr_storage*): ...

1
2 3 4 5
10