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.

1
vote
1answer
30 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 ...
41
votes
5answers
362k views

How to create a FTP user with specific /dir/ access only on a Centos / linux installation

So I'm on a VPS - CentOS Linux installation. I have vsFTPd on the server. I currently have SFTP access to the server via my root user, but am now trying to create a new user with FTP access to a ...
0
votes
0answers
18 views

Android nethunter can't find several files [on hold]

I'm trying to get KaliNethunter to work on my OnePlus5. I'm facing a problem though, and I really don't know what to say of it. There are several errors and they're all No such file or directory. ...
0
votes
1answer
898 views

Testing stunnel - tcpdump?

I have the following stunnel config on the server: chroot = /var/run/stunnel setuid = nobody setgid = nobody pid = /stunnel.pid cert = /etc/stunnel/stunnel.pem key = /etc/stunnel/stunnel.pem client ...
1
vote
1answer
261 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/...
1
vote
1answer
28 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
52 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*): ...
0
votes
1answer
29 views

Exit chroot from script

My script creates a chroot cage to install GRUB to a USB, run as sudo of course: SYSTEM_DIRS=(etc bin sbin var lib lib64 usr proc sys dev tmp) boot_partition=/media/user/boot for dir in ${...
0
votes
0answers
21 views

Moving MBR to a cloned drive with BTRFS

Context : I have cloned a disk with ddrescue (was supposed nead to death). I want the copy to be bootable. Both disks are installed in the PC, the old one (eventually in good health) on /dev/sdb and ...
6
votes
1answer
1k views

suexec with chrooted environment

I'm trying to get a chrooted Apache environment working running mod_fcgid with suexec. Looking at suexec log inside jail, the wrapper scripts are being executed with no problems, however, when I look ...
0
votes
0answers
22 views

How can I lock an FTP user to their home directory?

I have found some help regarding locking an FTP user to their home directory, but after following steps, I find I'm still able to run cd .. and exit that directory and browse the file system. I'm ...
0
votes
0answers
40 views

NixOS: Modifying config files on a buildFHSUserEnv environment

On NixOS, I'm using a FHS environment to supply libraries (unixODBC and sqlite-odbc) to libreoffice. { pkgs ? import <nixpkgs> {} }: ( pkgs.buildFHSUserEnv { name = "odbc-sqlite-libreoffice";...
0
votes
2answers
4k views

Install chroot in a user-defined directory

I want to install chroot in a custom directory. I am using kali-nethunter in my Android 6.0. Problem is I am running out of internal storage. So can't install more packages. Nethunter is installed in ...
1
vote
1answer
24 views

debootstrap chroot x11 cannot open display 0 no protocol error

after installing a chroot, I found trouble when connecting to x11, I would think this was a normal use case but coudln't find anything specific about this use case # debootstrap stable /srv/stable/ .....
0
votes
0answers
10 views

creating a chroot sftp user connecting to a different directory

I created a user and added it to its own group at the bottom of my sshd_config i added Match Group sftpusers ChrootDirectory /var/dir1/dir2 ForceCommand internal-sftp However, it gives ...
3
votes
1answer
1k views

Apache + mod_fcgid + chroot with mod_security. CentOS/RHEL 6

I am trying to setup a web server running Apache + mod_fcgid + mod_security chroot enabled and having a real hard time to get this working. Apache was installed from official CentOS repo and mod_fcgid ...
-1
votes
1answer
26 views

is it safe to run yum and install packages when the root file-system isn't that of the running system?

Example: I have a centos or debian X.Y installed on physical disks, with a 2.6 kernel. Now I put a "live distro" ISO (example archlinux) on one DVD and boot the system from the DVD, so now the ...
0
votes
0answers
28 views

Chroot directory and all of its parents must be owned by root?

I was under the impression that for chrootdirectory to work: The chroot directory and all of its parents must not have group or world write capabilities (ie chmod 755) The chroot directory and all of ...
1
vote
0answers
51 views

Chroot Jail User | Allow access via ssh shell

How to allow chroot Jail users(sftp) to access terminal through SSH. The user will placed file via WinSCP (chroot Jail).then on same server login to putty(ssh) there is a script that will launch ...
6
votes
3answers
13k views

What to do to run GUI Java app in chrooted environment?

In my case Java app is JDownloader. I prepared chroot environment as explained here: http://www.0x61.com/forum/post5240333.html#p5240333 and here: http://interreality.org/~reed/java-chroot.html ...
1
vote
0answers
41 views

Unable to create chroot in Ubuntu [closed]

While trying to create chroots using: '/usr/bin/schroot --chroot source:mini-buildd-licensing-1-amd64 --user root -- /bin/sh -c "echo 'deb http://repomanager.xxx.com:8082/ licensing-1 main' >/etc/...
2
votes
1answer
2k views

Any better alternative to chroot on an OpenVZ VPS?

Are there any better alternative to chroot environment? I'm thinking about running nginx on a jailed environment. BTW, I'm on OpenVZ VPS, so modifying the Kernel is a no-no. (I think that prevents ...
0
votes
0answers
23 views

How to run 2000 processes with chroot

I have a program that needs to be run in about 1000 instances, each in a different independent directory (/mnt/x_1, /mnt/x_2... /mnt/x_1000). What I'm currently doing is mounting /bin /dev and /etc in ...
39
votes
4answers
332k views

Limit FTP access only to the /var/www with vsftpd

I am running vsftpd as ftp server on my linux (rasbian), I log in to the machine as a root user. I would like to be still locked to using only /var/www, how can I configure vsftpd conf to accomplish ...
12
votes
1answer
3k views

Why do I need to use chroot

This question chroot-jail-what-is-it-and-how-do-i-use-it refers to what is and how to use chroot. What I don't understand is why do I need to use chroot. I understand what it does, but I can't think ...
0
votes
1answer
2k views

Setting up logging for chroot users

I have tried a few tutorials on this, but cant seem to get it to work. I would like to log user activity (change dir, upload/download file etc) for chroot users who are in a chroot jail. My current ...
2
votes
0answers
58 views

name resolves doesn't work in chroot for users, but does for root

I've booted a live-cd in order to download, compile and install a few packages on a otherwise working system without actually booting said system. I've created a build user on the system by issuing ...
50
votes
5answers
176k views

chroot: failed to run command ‘/bin/bash’: No such file or directory

When I run the chroot command an error is given: failed to run command ‘/bin/bash’: No such file or directory
-7
votes
1answer
67 views

Is chroot an example of application virtualization in Linux?

I am not very certain about the concept of Application/Process Virtualization. To help with that, what are some examples of application virtualization in Linux? (https://en.wikipedia.org/wiki/...
-1
votes
1answer
40 views

Does chroot need any special kernel support?

docker is said to be a steroid version of chroot. Does chroot need any special kernel support, e.g. namespace, cgroup? Does docker rely on chroot? I ask this because "Docker is not virtualisation: ...
0
votes
1answer
666 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), ...
4
votes
1answer
2k views

What are the dangers of having writable chroot directory for FTP?

People around the net are all yelling how insecure it is to have writable root FTP directory, if you configure your FTP server with the chroot option (vsftpd won't even run). I miss the explanation ...
5
votes
3answers
11k views

Unable to reach network from chroot

I have a complicated scenario, with most of the complicated parts working: SD card contains a Fedora 23 Raspberry Pi install on a LUKS/BTRFS filesystem. Fedora 23 x86-64 VM being used to manage the ...
0
votes
1answer
3k views

Virtualbox Not working Modules not working

So i am trying to install genymotion on ubuntu 16.04 and i need the modules running so i open up virtualbox, i get some warnings so i reinstalled virtualbox-dkms and i checked my headers which i got ...
7
votes
3answers
451 views

Why is chroot(2) unavailable to unprivileged users?

Why is chroot(2) unavailable to unprivileged users? I don't understand existing answers on the Internet. For example this one https://lists.freebsd.org/pipermail/freebsd-security/2003-April/000123....
0
votes
1answer
80 views

umount filesystem when exit from chroot

Is there a way to automatically unmount a filesystem when doing 'exit' command from a chroot? $ mount --bind /proc proc $ chroot . ~ exit #now in chroot and call exit. $ # back to main device. I ...
0
votes
1answer
15 views

Force SFTP user to login to specific dir

The end goal here is to have an sftp user that logs into /home/user1/data I have followed the instructions at the link below and they do work: https://www.vultr.com/docs/setup-sftp-only-user-accounts-...
1
vote
1answer
2k views

Run Java in a chrooted jail

I'm on a CentOS 6.5 machine with Plesk Panel which I used to create a chrooted environment for a user who can access it via ssh. I managed to let him use some basic non chroot standard command like ...
2
votes
1answer
1k views

Arch - How do Install a package made in a clean chroot?

I've been trying to build and install GNU Icecat from source on Arch linux using yaourt, but I've recieved errors during the build relating to the Infinality font set. I came across this page from ...
0
votes
1answer
1k 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
0answers
196 views

No user exists for uid 721001106 when running ssh command within SSH chroot directory

I am running debian 8 with SSSD authentication. The authentication works and ssh works fine. I have copied all libraries etc over to my SSH chrootdirectory and all my applications work except ssh ...
3
votes
2answers
476 views

Denying “/opt/” access for SFTP Users other than particular dir

I want to use my WebServer (Debian) as SFTPServer giving access to particular employees. The dir structure is as follows under root: /FTPUSERS/UserName_1, ... /FTPUSERS/UserName_N. My website is ...
1
vote
1answer
216 views

Jail in chroot in debian 7.5 - Privileges Separation problem

I'm trying to create a jail for a user in my server. Let's call the user "juser". What do I want to achieve? I want an ssh user to be jailed in his home folder and not have any access (whatsoever) on ...
0
votes
2answers
714 views

Cannot create root jail

I just tried to play around with chroot command only for testing purposes, in order to create a temporary root jail, but I didn't managed to. The platform is CentOS 6.4. and I have done it numerous ...
3
votes
1answer
1k views

SSH with chroot and only working “sftp”, “rsync” (both)?

I have two users and one shared folder in my Ubuntu server: User writer, which has write access to /var/shared. It's an application regularly making file changes in this folder from remote, with SSH ...
1
vote
1answer
33 views

GNU Screen requires different permissions for chroot environment? /run/screen

I have my computer start secure shell in a chroot system at boot. (All the normal directories are bind mounted in the chroot system /run, /dev, /dev/pts, /sys, /proc). After logging in to the chroot ...
2
votes
1answer
1k views

Restrict SFTP users to different directories

How can I restrict some users/groups to some directories? I mean different users, different directories. What I have: Ubuntu 14. Experience with Ubuntu: Just started. What I have tried: I read this ...
0
votes
1answer
119 views

SFTP SELinux ssh_chroot_full_access

I always configured SFTP on Centos 6 like this: https://www.linuxtechi.com/configure-chroot-sftp-in-linux/ Where in the comment this item appeared: setsebool -P ssh_chroot_full_access on From the ...
0
votes
1answer
23 views

SFTP: chroot jail with different ownership

SFTP directory - /qon/app/report Ownership of the /qon/app directory is tom:qcc I cannot change the ownership to root:root as there are a lot of applications that depend on it. Is it possible to ...
1
vote
1answer
165 views

Trouble setting up an sftp chroot jail

I'm following the SFTP chroot wiki on ArchWiki and finding a huge snag: I can't get my sftponly users authorized. Output of tail -2 /etc/passwd (my 2 users): chris:x:1001:1002::/home/jail:/usr/bin/...