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.

413 questions
2
votes
1 answer

How to 'apt-get upgrade' a debootstraped chroot jail from outside?

I have a daemon running in a chroot jail that I have generated with debootstrap. I'd like to remove apt and dpkg from the jail, but I want to keep the other packages updated. Can I upgrade the packages in the jail, running apt-get from outside?
2
votes
0 answers

Why is update-grub unable to find my root device?

I created a new root partition and I am trying run update-grub inside a chroot. I bindmount the following for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done And then: update-grub /usr/sbin/grub-probe: error: cannot find a…
user1295450
  • 51
  • 1
  • 5
2
votes
1 answer

How to run "apt-get" in chroot from systemrescuecd?

I boot with systemrescuecd 4.3.1, and run like below. $ mkdir /tmp/os $ mount /dev/sda1 /tmp/os $ mount -o bind /sys /tmp/os/sys $ mount -o bind /dev /tmp/os/dev $ mount -o bind /proc /tmp/os/proc $ /usr/bin/chroot /tmp/os /bin/sh -c "apt-get purge…
user180574
  • 225
  • 1
  • 3
  • 12
2
votes
2 answers

VSFTPD seems to ignore the configuration settings

I have been batling with vsftpd for days now. I started with trying to setup seceure vsftpd on my current Centos 5.6 server but could not lock users down to their home directories. I spent days trying all the suggestions I could find with…
user249398
  • 29
  • 2
2
votes
1 answer

chroot 64 bit -> 32 bit = 'command not found'

Very obviously 32 bit cannot chroot to 64 bit but I am confident that I have successfully chrooted from 64 bit to 32 bit using Gentoo but when I [root@localhost ~]# mount /dev/vg_atom1/lv_root /mnt/lvm -o exec [root@localhost ~]# mount -t proc proc…
bro
  • 191
  • 8
2
votes
1 answer

Home/end keys are not working correctly in the bash CLI for a jailed user using PuTTY

I'm using PuTTY to access my U14.04 LTS server via SSH. When I log in using my main account, the number pad keys work fine in the BASH CLI. When I log in to a user who's been jailed using Jailkit, the home/end keys return a '~' character and bell in…
gone
  • 209
  • 1
  • 10
2
votes
1 answer

chroot user to var/www/html

Can I limit a user login through sftp only can see and change files under var/www/html folder? I tried below, but then I can't login in Transmit through sftp # adduser user_www # passwd user_www # vi /etc/ssh/sshd_config // add in file end Match…
user1775888
  • 147
  • 1
  • 4
  • 13
2
votes
1 answer

How can I get openSSL to run on my web server with a PHP5-FPM chroot?

On my web server, I changed the chroot to only have access to the root of my website's home directory as opposed to the rest of the file system, for security purposes. However, I've noticed that since the change I can't seem to get OpenSSL to be…
Nickersoft
  • 121
  • 1
2
votes
2 answers

nginx+php-fpm(chroot). No input file specifed

OS: Centos PHP: 5.5.6 Nginx: 1.4.4 Nginx conf server { listen 80; server_name example.ltd; root /srv/example.ltd/www; index index.php; access_log /srv/example.ltd/logs/nginx-main.log main; error_log /srv/example.ltd/logs/nginx-error.log…
user201166
  • 21
  • 1
  • 3
2
votes
2 answers

Virtualmin Chroot FTP Users

Can someone tell me how to chroot FTP users with Virtualmin, if it is possible.
madphp
  • 379
  • 3
  • 12
2
votes
2 answers

What is the right way to chroot perl script?

I created /opt/chroot, create bin lib and other directories in it, copied libraries, bash and perl binaries in proper places. Also I placed my script into /opt/chroot/bin/. Now I can run the script such a way: # chroot /opt/chroot script.pl There…
lexsys
  • 2,913
  • 6
  • 31
  • 34
2
votes
2 answers

CURL in PHP chroot'ed environment

How can I find out what files or sockets are needed by Curl when running in a chroot'ed PHP environment on Mac OSX? I recently secured my website by chrooting PHP but now every call to Amazon S3 through it's API is failing, with the error…
Danack
  • 1,216
  • 1
  • 16
  • 27
2
votes
2 answers

can not run java inside grsec chroot

java runs well inside common chroot. however in a grsec hardened chroot it complains it has no enough memory to build VM. any ideas of how to make it run cause i really need a hardened chroot. thanks.
San Tiago
  • 31
  • 3
2
votes
4 answers

Setting up a chroot sftp on debian server

I'm trying to allow a user "user" to access my server by either sftp or ssh. I want to jail them into a directory with chroot. I read the instructions here however it does not work. I did the following: useradd user modify /etc/ssh/sshd_config and…
dukevin
  • 1,630
  • 3
  • 18
  • 25
2
votes
1 answer

Is it possible to allow key based authentication for sshd_config chroot sftp users?

I'm running an Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-30-generic x86_64) Server, with OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012. I'd like to configure chroot for sftp access using settings in /etc/ssh/sshd_config, with key based…
Ted LeRoy
  • 41
  • 1
  • 4