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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
92 views

Installed Ubuntu server 23.10 using debootstrap / chroot - on boot it fails to mount the correct root partition

I'm trying to work out a process for remote installation of Ubuntu Server. I want to have someone at the other end insert a flash drive and boot up, then I will ssh in and install. Here's the process ...
Jon Hulka's user avatar
  • 121
0 votes
2 answers
141 views

GNU Rush invalid uid

I'm trying to configure Rush for limited shell and scp access to a server I have. I am using Rush 2.3, fresh compiled. And the default config they have in their docs. Still, everytime I try to run a ...
jfreak53's user avatar
0 votes
0 answers
54 views

ACL permissions on Chroot directory

I have the Named service in a Chroot environment, I need a user to be able to modify the live files of the path /var/named/chroot/etc and I do not want to give full permissions with sudo, I have used ...
fah81's user avatar
  • 1
0 votes
1 answer
364 views

How to fix a corrupt server (after upgrade) with chroot in rescue-mode over ssh

First, I'm NOT trying to create a ssh-jail. Here's the situation I decided to upgrade my server from Debian 9 to 12. But now I'm locked out. I went step by step : from 9 to 10, 10 to 11 and 11 to 12, ...
Manumie's user avatar
  • 43
0 votes
1 answer
184 views

Using internal-sftp for a single user instead of all users?

I am setting up a restricted sftp user with chroot, the standard procedure works fine for me, however I have existing users using sftp on the same server, and that's why I don't want to take a risk ...
LAHOUEL Youssouf's user avatar
0 votes
0 answers
67 views

chroot vs home_folder in vsftpd

I'm using vsftpd, and I can't seem to get the behaviour I want through vsftpd.conf. What if you want /folder to be the change root folder to disallow users from going one folder up, but the starting ...
Jesse Stacey's user avatar
1 vote
0 answers
220 views

Availability of CHROOT in Docker containers and clusters

Is the Linux tool chroot generally usable in a Docker container running in clusters and cloud platforms? (background) I'm developing an application where I may need to use chroot inside a Docker ...
Matteo T.'s user avatar
  • 111
1 vote
1 answer
5k views

chroot:failed to run command '/bin/bash':No such file or directory on debian 12 live

I am using the Debian 12 live environment and have created a folder: mkdir /mnt/boot When I execute sudo chroot/mnt/boot, the following error is reported: chroot:failed to run command '/bin/bash':No ...
ABeginner's user avatar
1 vote
1 answer
200 views

Pure FTP Server let's me download files from "Bind Mounted HTML" folder but will thrown 533 Error to STOR command when uploading Index.html

Yesterday I finished configuring a FTP Server using Pure-FTPd. The method I am using is the "Virtual Users" method. The commands below are basically what I executed it in order to make it ...
Raul Chiarella's user avatar
0 votes
0 answers
267 views

(13)Permission denied: AH02611: create: apr_shm_create(/log/slotmem-shm-p24af65f1_0.shm) failed

I updated httpd to version 2.4.57. I compiled httpd on my own and when I start httpd within a chroot environment, I am getting this error message in the logs: [Thu Jun 22 14:33:27.319378 2023] [...
MrPython's user avatar
0 votes
0 answers
177 views

Multiple users chrooted to single directory when using SFTP

Heyho, so, while experimenting with setting up my own webserver on a Raspberry Pi, I've come up with something that should be quite simple in my opinion, but seems to be quite hard (or I can't find ...
Solus Bellator's user avatar
2 votes
1 answer
1k views

Use netns to bind programs to specific IP addresses

I have an IP address on my server, say, 192.168.0.3, I want to share in a net namespace, so to run apps there which will only be able to communicate to the internet using that 192.168.0.3. I can "...
Avenger's user avatar
  • 21
1 vote
2 answers
1k views

How can I set specific directory for different users in proftp?

Currently, when user A logs in proftp, he comes at his home directory /home/A, when user B logs in proftp, he comes at his home directory /home/B. I want to let user A come at /dir1 and let user B ...
peter's user avatar
  • 113
0 votes
1 answer
1k views

Can't chroot users correctly with vsftpd

I used this tutorial to install vsftp. Everything seems to work fine except for two things: Even though I set local_root=/home/$USER/ftp the default location when I use any ftp-client is /home/$USER. ...
MaestroMaus's user avatar
0 votes
1 answer
2k views

ubuntu 20.04 - ChrootDirectory in sshd_config wont work with tokens %h or %u

I am trying to lock users into their home directory using a dedicated group in the sshd_config. The section of my group looks as follows Match Group sftponly ChrootDirectory %h X11Forwarding no ...
azraelAT's user avatar
  • 103
0 votes
0 answers
190 views

Command logging for chroot ssh users

I have a ubuntu server that allows users access via ssh. When they log in they are contained to their chroot directory. I'm looking for a way to log commands used by the users. I've tried using snoopy ...
honepoyG8's user avatar
1 vote
0 answers
62 views

Tilde (~) shortcut in chroot jail

I have set up a chroot jail with bash for an ssh user. The "true" path of the home directory is /home/jails/home/name, and the chroot directory is /home/jails. When the tilde ~ shortcut is ...
Somphyr's user avatar
  • 11
0 votes
1 answer
160 views

OpenSSH ChrootDirectory man page remark on safety

In the sshd_config(5) man page in my system I found this remark in the section about ChrootDirectory: For safety, it is very important that the directory hierarchy be prevented from modification by ...
polettix's user avatar
  • 101
1 vote
2 answers
442 views

Debian unattended (preseed) installation, access to audio card(s)

I'm using the preseeding feature in order to shape a custom Debian 10 x64 system. Everything is happening well, except that during the late_command step, I'm running a shell script to configure and ...
Bil5's user avatar
  • 153
0 votes
1 answer
123 views

monitoring real time file access in chroot system

I was wondering if it's possible to write a shell script that: runs chroot for a given userspec and group monitors/intercepts system calls all processes started, and what libraries they attempt to ...
cestmoi's user avatar
0 votes
1 answer
4k views

Allow SFTP access to one or several directories for several users

For some of my users, I need to allow them SFTP access to one or several directories. Multiple users can have access to the same directory. But for directories they don't have permission for, they can'...
FlipFlap's user avatar
0 votes
1 answer
235 views

Is there another way to restrict SSH user other than chroot jail?

I need to create a safe environment for a foreign SSH user that has to have very restricted access to our server. That is: can only execute commands that are allowed can only use specific software ...
Ondřej Holík's user avatar
1 vote
1 answer
207 views

chroot not able to start service - not found. What is missing?

I would like to run a service inside a chroot in a NetBSD 9.1 amd64 system. The service runs if invoked from OS. The service in question is dendrite-monolith-server. I just copied the file for ease ...
Luis's user avatar
  • 283
0 votes
1 answer
412 views

sftp with Jailkit Connecting to host failed (exit status 4)

I'm running Ubuntu Server 18.04 with Jailkit 2.21, wanting to allow chrooted scp/sftp access via password to some users. The sftp client can authenticate OK, but then just disconnects with a "...
TommyPeanuts's user avatar
0 votes
1 answer
757 views

df shows low disk space. It includes a directory which uses mount --bind for chroot sftp

I've setup a chroot environment for sftp access (sftp only, no shell). The sftp user needs rw access to a host directory. I mounted it via /etc/fstab /var/www/html /home/sftp-user/jail/html none ...
RafaelKr's user avatar
  • 101
1 vote
0 answers
188 views

Annoying sftp chroot again (Ubuntu 20.04)

I think I understand all of the moving parts of not allowing a chrooted user over sftp to write to their own home directory (/home/username), but instead to write to an enclosed directory (/home/...
user603157's user avatar
0 votes
1 answer
1k views

SFTP Chroot write in chrooted /

Hey, I'd like to write with the chrooted user in his / but i can't. Example: i have /home/sftponly/ as ChrootDirectory Inside has to be another Directory with Permissions to this User, otherwise i ...
roseroserh's user avatar
1 vote
2 answers
4k views

OpenSSH + Active Directory: allow sftp for a group while disallowing everyone else

My objective is to allow a given Active Directory group members to use OpenSSH SFTP in chroot, and deny access to SSH for them and all others that aren't members of that group, while still allowing ...
Daichi42's user avatar
1 vote
1 answer
313 views

Performing an OpenSCAP Remediation via a chroot session -- "Can't perform remediation in offline mode" Error

I am attempting to perform an OpenSCAP remediation through a chroot session. My command is structured as follows: oscap-chroot /mnt/chroot_fs \ xccdf eval \ --remediate \ --...
TJ Zimmerman's user avatar
0 votes
1 answer
289 views

restrict access .ssh folder from the connected user

In complex setup where user connected to remote host using authorized private key, there is a .ssh folder with user settings and keys related to the remote host. Is it possible to disallow the ...
Robert Navado's user avatar
0 votes
1 answer
2k views

php exec returning 127 because /bin/sh is getting "Permission denied" in apache chroot

I have a php script that is trying to use exec (or shell_exec) to execute a binary on the system. The exec is failing with return code 127. Return code 127 normally means command not found. So I made ...
mhost's user avatar
  • 1,229
0 votes
1 answer
3k views

VSFTPD: set a user's default directory to NOT their chroot directory

I have a VSFTPD setup in which users are chrooted to their home directories. Standard stuff. But this requires all of their home directories to be unwritable to them (to avoid security issues.) No ...
Eliezer Miron's user avatar
1 vote
0 answers
56 views

Install Linux on a second disk from an already running Linux (RHEL 7.8) instance

I am trying to mount a second disk on a running Linux (RHEL 7.8) AWS instance, install a customized bootable Linux environment to it, and then change that disk to an AMI so we can boot new Linux ...
ALittleStitiousPuppet's user avatar
0 votes
1 answer
184 views

Configure multi-level sftp access

I'm setting up a sftp server where clients will only have read-only access. They will log into their chroot directories, which is fine, but I need an admin account that can access/write to those ...
iGuy's user avatar
  • 1
1 vote
1 answer
3k views

How to specify user home in sshd config?

I have my sftp users chrooted into /var/www and I would like for them to be automatically moved into their directory. I found this answer which helped me a lot: Chroot SFTP - Possible to allow user to ...
leonheess's user avatar
  • 144
0 votes
1 answer
1k views

AWS EC2 Linux restrict SFTP user to their home directory when users connect from WinSCP

I'm working on a solution to restrict the user to the home directory or a specific directory. I need to restrict a user for below scenario, we have multiple Wordpress installation in webroot /var/www/...
KNCK's user avatar
  • 1
1 vote
1 answer
466 views

PHP-FPM chroot - one pool for all nginx virtualhosts

Now we have multiple virtualhots (nginx) under one php-fpm pool. We would like to use it same way with chroot. Chroot directive is absolute path /var/www, but chdir should be /[domain]/httpdocs Is it ...
andrew's user avatar
  • 295
0 votes
0 answers
32 views

Setting up account to upload to a website subdirectory

I need to setup a stfp account on Ubuntu 18.04 that meets the following requirement: Can upload to subfolder of website i.e. example.com/subfolder/ Uploaded files belong to www-data group so are ...
Guerrilla's user avatar
  • 263
2 votes
0 answers
376 views

Setting up virtual users with vsftpd

I'm trying to set up virtual users for an FTP server in a Linux box, but I'm not sure if the server I've picked up (vsftpd) can do what I need. My requirements are: The FTP accounts are inside a ...
PaulJ's user avatar
  • 161
1 vote
0 answers
89 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 ...
Dumb  admin's user avatar
0 votes
0 answers
2k views

Running docker from within a chroot

I am trying to build a distro for RaspberryPi which ships with an aarch64 chroot running docker. For this to work, I need docker to run within a chroot. I am basing of rasbian, which is distributed ...
GuySoft's user avatar
  • 435
0 votes
1 answer
1k views

Why does internal-sftp verbose logging not include rename, move and delete operations?

I have configured a CentOS 7.7 installation to use the internal-sftp subsystem and to chroot a specific user in to a particular folder. I want to enable logging, so I configured sshd like this: ...
jamieburchell's user avatar
1 vote
1 answer
3k views

Restricting SFTP users (OpenSSH-based) to a custom port only

I understand that there have been tons of other threads on the Internet on allowing OpenSSH SFTP connections on a custom port. I've hit them, not all, but a lot. And have not been able to make it work ...
Tung Nguyen's user avatar
0 votes
0 answers
456 views

Allow SCP/SSH to a chrooted environment only?

Is there a way to do this without installing a package like rssh or scponly, as they seem woefully out of date and full of security problems? Is there any newer tool I could use? ssh is an optional ...
Paul's user avatar
  • 253
2 votes
1 answer
1k views

Chrooted SFTP user can't login

I'm trying to configure a user who will only be able to access to an specific directory. I've configured a Chroot jail in SSH and changed its home directory, but configuring the internal-sftp with ...
Zarovich's user avatar
0 votes
1 answer
2k views

Execute half of the %post section of a kickstart in a nochroot environment and the other half in a chroot environment

I am trying to execute a script that performs certain security configurations on my recently installed system. Much of the script refers to files starting with / as the base directory which presents ...
peachykeen's user avatar
1 vote
0 answers
369 views

How do I remove a kernel package from an image chroot if it's the kernel running on my build host?

I am trying to build a custom image using diskimage-builder, and amongst other things, that tool updates all the packages within the image to the latest version, including the kernel. It also uses ...
Drulgaard's user avatar
0 votes
1 answer
1k views

LocalForwarding on a SSH connection from my desktop client to a CHROOTED user in an LXD container

I currently have a proxified web host setup for local development, yet I'm trying to make it a proper (documented) setup so I can deploy it on practically any VPS hosting. Currently everything else ...
Elias's user avatar
  • 1
1 vote
2 answers
1k views

Configure cron jobs for the chrooted user

I've configured chrooted SSH user on CentOS 7. Mounted /proc, /dev, /dev/pts to the user and installed required packages. And now I want to allow cron jobs for this user. How can I solve the task? ...
kurgulus's user avatar
2 votes
1 answer
2k views

Ubuntu root password reset

I have a dedicated server that i've just setup at Hetzner. I've done the stupid thing of not changing the temp password they give you and disconnected from the SSH session. They don't send nor store ...
Nathan's user avatar
  • 165

1
2 3 4 5
9