Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
9 views

Issues with apt and aptitude on debian jessie (chroot environment)

i have a chroot debian os running on my rooted android phone, i recently tried installing InstaPy on it and ran into the following errors root@localhost:/# cd InstaPy root@localhost:/InstaPy# python3 ...
0
votes
1answer
33 views

How can I change the hostname in a chroot environment permanently? [on hold]

I can not change the hostname in the chroot environment (Ubuntu) I tried hostnamectl set-hostname but it says: Failed to create bus connection: Could not find file or folder Then I tried changing it ...
0
votes
1answer
29 views

No internet connection in chroot environment (customizing iso)

I want to customize a Ubuntu Desktop Iso and I have come that far, that I am in the chroot environment. The problem is that I do not have Internet access in there to install anything. I just can ...
-1
votes
1answer
47 views

How consider home folder as root folder?

I create users who each have their own home directory, normal. Currently I create my user as follows: adduser -d / home / ftp / myUser myUser My users need to connect to SFTP (open ssh installed on ...
0
votes
0answers
16 views

utmp and chroot

I'm trying to chroot in this way: cloc3Lnv ~ # LC_ALL="C" chroot --userspec=chrootuser:user /var/chroot I have no name!@cloc3Lnv / $ id uid=2707 gid=100 groups=100 Unlikely, the user "chrootuser" is ...
0
votes
2answers
33 views

ldd shows no location after arrow; library does not exist on system

I want to create a chroot environment that has access to hand-picked programs but is completely isolated from the rest of the system. I created three folders in this chroot folder: bin, lib, lib64. I ...
0
votes
1answer
37 views

For pivot_root I want to kill all processes oldroot is using so that I can detach MTD partition.. and exit shell and go back in

I have an embedded linux on arm7. I have a rootfs mounted on MTD partition 10 (for example), i.e. /dev/mtd10, which is a flash device. The volume is UBIFS device UBI0 (/dev/ubi0). I have setup a ...
0
votes
1answer
56 views

Chroot SSH - Command not found

I have a bin directory in my chroot directory that contains commands like bash date ls...etc If i simply chroot to my chroot directory. i am still able to invoke commands listed in the /bin. However ...
1
vote
0answers
40 views

How to use Jailkit Jail Manager in Virtualmin to restrict users

How to use Jailkit Jail Manager in Virtualmin (Webmin 1.892) to restrict users in their homes including virtual website and all services running under user? I am setting up small website hosting ...
0
votes
0answers
47 views

groupadd --root vs. chroot + groupadd

I am trying to prepare an image with buildah, but I am running into a problem with creating a new group inside the container. buildah mount created a resonably healthy looking dir structure at /var/...
0
votes
1answer
25 views

Redirect output without telnet information to file

I am trying to download a binary file from an HTTP server with GNU Telnet, a tar archive to be exact. I can currently download regular files, but I can't properly redirect the output to a file. The ...
-1
votes
2answers
43 views

Switch back and forth between chroot jail and Host in the same terminal

I have a created a chroot jail in my Ubuntu 14.04 machine using schroot and debootstrap. Now I want to write a shell script that goes back and forth between my native environment and the chroot. ...
0
votes
0answers
21 views

chroot vs. schroot for running a script on an external hard drive

In short, if I have an external hard drive mounted under another Linux OS, and I want to run a script on that hard drive, will it be better if I use chroot or schroot? The longer story... I have a ...
0
votes
1answer
56 views

How to create a restricted shell for a specific user

I'm trying to create a restricted shell for a maintenance user. This user should only be allowed to execute a single bash script within his home folder. The user should not be allowed to execute any ...
1
vote
1answer
43 views

chroot + mount = EBUSY

I have a large, complex application. I'm trying to run it from a boot CD, which is obviously read-only. But the application needs a large writable area. (A ramdisk won't cut it.) So I've managed to ...
1
vote
1answer
184 views

Error when executing scripts within chroot environment

i wrote a small script to remove and purging some packages and install new one within chroot environment(debian 9), but when i run the script i got this error when the script running the purging ...
1
vote
1answer
40 views

Is a Chroot Jail for SSH *and* SFTP?

I'm trying to setup a chroot jail, but I'm not sure how to make this work in SSH and SFTP. A quick question, will something like this work for both SSH and SFTP or just SSH? If it doesn't work for ...
0
votes
0answers
54 views

using debootstrap to create rootfs offline

I want to create debian filesystem offline (downloading only once). I am on a Ubuntu system and have tried the following : sudo apt-get install debian-archive-keyring Making the tar ball of the ...
0
votes
2answers
313 views

Running systemd utilities like systemctl under an nspawn?

If I have a directory that I bootstraped with debootstrap that I got inside of running systemd-nspawn what do I have to do make its internal systemd functional? $ sudo systemd-nspawn -D ./foo ...
0
votes
1answer
199 views

systemd-nspawn vs chroot and bind mount?

Does systemd-nspawn do special inside to a chroot or does it just provide a different method of running chroot + the appropriate ro --bind mounts for proc, sys. The docs say, similar to chroot(1), ...
0
votes
1answer
340 views

Run systemd script in chroot from outside the chroot?

Is it possible to run a SystemD service with a different root? For example if I use debootstrap to install a parallel distro, and inside that distro is a systemd service I would like to run, is there ...
6
votes
1answer
353 views

How to perform chroot with Linux namespaces?

After reading about Linux namespaces I was under the impression that they are, amongst a lot of other features, an alternative to chroot. For example, in this article: Other uses [of namespaces] ...
1
vote
0answers
33 views

What is obvious security vulnerabilities running guix-daemon as root? [closed]

Here was recommended to use pool of build users because of security reasons https://www.gnu.org/software/guix/manual/en/html_node/Build-Environment-Setup.html#Build-Environment-Setup Please, which ...
1
vote
1answer
32 views

Bash in chroot strange key movements

I'm trying to set up a chroot environment with only bash in it. This is what I have so far: [root@free]# tree . . ├── bin -> usr/bin/ ├── dev ├── etc │   ├── bash.bash_logout │   ├── bash.bashrc │ ...
-2
votes
2answers
216 views

Chroot : no such file or directory [closed]

I know it has been asked before but they do not solve my problem. I have already binded the /dev and /proc, copied the qemu-arm-static to /usr/bin. But chroot fails at executing any command. It was ...
0
votes
1answer
411 views

SFTP not logging to /var/log/sftp.log

This article (Setting up logging for chroot users) is the only one that has helped me to get logging working for chroot'd sftp users, so huge thanks for that! However, for some reason, my logs ...
1
vote
1answer
94 views

I don't understand how entering a mount namespace can work

either if you fork into a new mount namespace, or enter an existing one. It is possible to hold file descriptors from a foreign mount namespace. You can demonstrate this very easily, by finding a ...
0
votes
1answer
58 views

Lazy unmount root jail drives

I have created a root jail containing rpm and yum (centos 7.5) to install some software on the original system. Workflow Mount sys, proc, dev to the root jail Mount root of the original system "/" ...
14
votes
3answers
981 views

Why would I chroot for sandboxing for security if my application can from the beginning run at a lower level?

I am writing an HTTP server daemon in C (there are reasons why), managing it with systemd unit file. I am rewriting an application designed 20 years ago, around 1995. And the system they use is that ...
0
votes
0answers
67 views

SMB via Crouton - how to make this work?

I have Samba set up on a Raspberry Pi and I would like to use it as a small file server to extend the amount of storage space I have available for my Chromebook from within crouton. I am able to ...
0
votes
2answers
59 views

Making a bind-mount take effect only in the context of the current process and its descendants

I have 2 files: /MyDir/a and /MyDir/MySubDir/b and am running a bash script, to which I want to add code to make file /a point to file /b, but only in the current process and its descendants. In ...
0
votes
1answer
91 views

using a chroot jail to change the results of uname -n

I just learned what a chroot jail is so excuse me if this questions doesn't make much sense. Basically I have two processes running locally in my machine and would like the results of "uname -n" to ...
0
votes
2answers
63 views

What are limitations chrooted system? [closed]

Chroot allows us to change the root directory, or rather root directory of specific process. Now obviously this does restrict the process to the specified tree (unless it doesn't relinquish the ...
0
votes
1answer
87 views

What rule prevents entering a user namespace from inside a chroot?

# rpm -q --whatprovides /usr/bin/unshare util-linux-2.32-2.fc28.x86_64 # unshare -r # i.e. the above succeeds, where the following does not. What rule causes this? # rpm -q --whatprovides /usr/sbin/...
0
votes
1answer
49 views

How to copy/paste list of commands with chroot

I want to create a script that executes the following commands, one after the other. The problem is the chroot command: everything after that command is not copied into the chroot environment as I ...
0
votes
0answers
94 views

Modify existing overlay mount

Is it possible to insert additional lower layers to an existing overlayfs mount? The idea is to add new features to a running "chroot" so that they immediately see these changes in their root fs ...
0
votes
1answer
49 views

Docker | Chroot jail questions | Node.js kind of hosting

Ok so I'm using Docker and I'm not familiar w/ Chroot jail yet. I have Docker image w/ installed Debian / Node.js. But I want that every single Debian user can run their own Node.js application w/o ...
1
vote
1answer
143 views

Security implications of chroot()

I want to setup a small FTP server for personal use, and decided to use vsftpd for that. I thought that I should enable chroot_local_user, so users are chrooted to their home directory upon login. ...
0
votes
0answers
18 views

Mono Nuget Assembly Error in Linux

My questions is about the microsoft mono package and using it with NuGet. Long story short, I'm hoping I can have a working .NET Engine for a couple of games I wanted to install that requires this. ...
0
votes
0answers
54 views

MIPSEL statically linked binaries

I'm having trouble running MIPSEL binaries on an ARMEL machine. I am using the Debian "Wheezy" distro. I added the "foreign" architecture (MIPSEL) to the system. What's strange is, when I chroot into ...
2
votes
1answer
354 views

How can I fix “mount: /mnt/proc: permission denied” error during arch chroot installation using “proot”?

I'm trying to install arch using proot(instead of chroot). I'm following arch wiki. Steps I've followed: 1. Downloaded and extracted arch bootstrap file. 2. Instead of using arch-chroot script in the ...
-1
votes
2answers
83 views

How is a root directory used for resolution of absolute pathnames?

APUE says Each process also has a root directory that is used for resolution of absolute pathnames. This root directory can be changed with the chroot function. I thought only ...
0
votes
1answer
70 views

Application crash in chroot jail

I have a Debian 9 installation with a Debian 6 chroot jail. I am using a proprietary application which up until recently worked fine in the jail. But when I run its newer versions, it crashes in libc. ...
0
votes
0answers
35 views

Starting Script at FTP login

I run a vsftp server on Debian and connecting with FTP over TLS. all allowed users are jailed in a chroot after login. Now i want to mount different folders inside the users chroot. For every single ...
-2
votes
1answer
161 views

Trouble with an unprivilaged users in a chroot under Debian

I'm having trouble with users in a chroot under Debian GNU/Linux. I have created a chroot for the stable distribution using debootstrap. I enter the chroot by using the following script #!/bin/sh -...
0
votes
0answers
105 views

How do I mount a file on top of a broken symbolic link?

In preparation of a chroot I'm doing an mount --bind /etc/resolv.conf ${MOUNTPOINT}/etc/resolv.conf. I need this because the ${MOUNTPOINT} contains a broken etc/resolv.conf. However, mount is ...
1
vote
1answer
55 views

how to share a repository inside a chroot in a VM with visual studio on windows dev PC?

I have a windows development machine on which I have visual studio, and I have a debian stretch in a virtualbox VM, in which I have a chroot. I created a chroot to have armhf versions of libraries, ...
2
votes
0answers
335 views

While compiling 32 bit binary on 64 bit Linux (ubuntu 14.04) getting wrong ELF class error “wrong ELF class: ELFCLASS64”

I have 64 bit Ubuntu 16.04 installed on my system. For some reasons i have to change root directory to a directory which is nothing but a replica of a different system with the required libraries ...
0
votes
1answer
33 views

Make directory appear as other directory - mount trickery?

we operate within a corporate environment with many slightly weird constraints, to become effective in this environment we have created our own system for building and deploying software. The software ...
0
votes
0answers
230 views

Let an SFTP user to read/write access another user directory

Apart from the root user I've created another which has ssh access and read/write all the /home/public_dir contents. That user is web:web. I want to give SFTP access for a developer to read/write ...