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
3k views

schroot only works as root

I recently changed my OS from openSUSE to CentOS. A part of that transition was migrating my chroot jails and schroot configuration. That transition does however not seem to be "plug and play". I used ...
Richard Dungal's user avatar
1 vote
0 answers
2k views

CentOS 6.5 ssh ChrootDirectory not working

I have been trying to configure my CentOS 6.5 minimal 64 bit machine to allow SFTP users to connect and get jailed to specific folders. I can sftp in using the unix commmand: "sftp user@localhost" and ...
Hussein Sabbagh's user avatar
1 vote
1 answer
5k views

Chroot on Ubuntu 14.04.2 using Jailkit - /dev/pts No such file or directory

For the past few days I've been trying to setup a chroot on my Ubuntu server but I've been running into an issue. I've tried several different methods of setting up a chroot on Ubuntu including just ...
Nadeko Sengoku's user avatar
1 vote
2 answers
3k views

Trying to ChrootDirectory an SFTP user to their home directory

I have followed a few examples of how to do this, all of them end up with modifying sshd_config to Subsystem sftp internal-sftp Match User chubbyninja ChrootDirectory %h AllowTCPForwarding ...
CᴴᵁᴮᴮʸNᴵᴺᴶᴬ's user avatar
0 votes
3 answers
3k views

Enable non root user to upload/download onto website directory

I have a website in my VPS. I install Debian 7 on that VPS. My http document is located in directory /var/www/example.com I installed Nginx on that server and directory /var/www/example.com is owned ...
user3195859's user avatar
-1 votes
1 answer
624 views

I can't create chroot user with full permissions

I am trying to create chroot user but i want to give him a permissions to create and delete files and directories. I have Ubuntu server installed on virtualbox and i am connecting to it from my host ...
user1800997's user avatar
0 votes
0 answers
379 views

PHP FPM, chroot can't connect to AWS RDS

I've been experimenting with chroot'ing php-fpm pools via the built-in chroot method in php's pool config. This is for the purpose of hosting multiple wordpress websites on the same AWS EC2 instance. ...
Matt Fiocca's user avatar
0 votes
1 answer
715 views

Files uploaded using FileZilla with SFTP are missing permissions

I am using chroot in sftp. And it works perfectly, but files uploaded with FileZilla are stored without any permissions (basically 000). ---------- 1 cwsftp sftp 4364328 Jan 19 16:02 hygq8KAZ3seC.128....
undefined's user avatar
0 votes
1 answer
1k views

sftp login issue with chroot

I want to be able to create a structure for hosting multiple sites. I want the user files to reside inside /var/www/sites/domain.com and the sftp access to be restricted with chroot. I've followed ...
Nicolas's user avatar
  • 191
5 votes
1 answer
14k views

Configuring Chroot for SFTP Users

I am trying to configure a SFTP server for some automated backups. I configured an Ubuntu 14.04 server and have had partial success. The idea I'm looking to do is this: A user will be created for ...
imlepid's user avatar
  • 175
2 votes
1 answer
2k views

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 ...
Giacomo Tesio's user avatar
0 votes
1 answer
362 views

How to lock a user into a directory (not SSH)

I have regular users who are not SSH'd into a machine but are accessing the machine directly. How can I lock them into their home directory or any directory? At the moment they can successfully run rm ...
user974407's user avatar
  • 1,111
0 votes
1 answer
821 views

Chrooting Shell Environment on debian wheezy

I created a chrooted user on a directory /home/jail, Inside my /home/jail are the bin,dev,etc,home,lib,lib64 and usr directories. /home/jail/ {bin,dev,etc,home,lib,lib64,usr} are all owned by root:...
Jm Cruz's user avatar
2 votes
0 answers
3k views

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-...
user1295450's user avatar
0 votes
2 answers
2k views

Chroot doesn't work in PHP5-FPM + nginx

I have added two line in: "/etc/php5/fpm/php-fpm.conf". There are: chroot = /home/user/www/public_html chdir = / In the server section of my: /etc/nginx/sites-available/default: root /home/user/www/...
JavaRunner's user avatar
0 votes
1 answer
879 views

Allow dev user to edit files that sometimes belong to www-data

This question has been asked time and time again but none of the answers seem to answer my specific question - either that or I'm not getting it. Anyway, as per the title, I'm trying to limit our web ...
Touff's user avatar
  • 183
1 vote
1 answer
4k views

"No input file specified" when running php under fastcgi inside chroot under nginx outside of chroot

I have a scenario with nginx/1.4.6 running on Ubuntu 14.04 but with php/5.2.10 inside a chroot Ubuntu 9.10 (Karmic Koala). My issue is that all requests to php files result in the dreaded "No input ...
Xyz's user avatar
  • 121
0 votes
1 answer
1k views

Chrooted user logged out immediately after login

I am trying to use chroot to setup a user who can login via ssh and limit access to the /var/www directory. The server is on AWS running Amazon Linux 64-bit, openssh installed. I used ssh-keygen to ...
Complectia's user avatar
0 votes
2 answers
156 views

Name Server with Multiple IPs

We have multiple internet connections attached to my company's network, from different providers, and there are authoritative name servers on the network as well, also with an IP from each of those ...
crazedsanity's user avatar
0 votes
1 answer
458 views

Chef installation in a chroot (packer): not starting services

I'm trying to use packer.io to create a machine image for a server who's deployment I already have automated using Chef (chef-solo specifically), using the amazon-chroot builder and the chef-solo ...
shevron's user avatar
  • 336
2 votes
1 answer
5k views

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 $ /...
user180574's user avatar
9 votes
5 answers
13k views

How secure is SSH ForceCommand on a jump host?

I have the following setup in my network: Internet <--> Bastion <--> Local Network I have several users and each user is assigned to a specific machine. Or in other words: Each user must ...
Dr.Elch's user avatar
  • 191
0 votes
1 answer
797 views

chroot with sftp on centos 6.5

I'm trying to get sftp working with proper chroot configuration on Centos 6.5 server. As for now I get: sftp [email protected] [email protected]'s password: Write failed: Broken pipe Couldn't ...
incogn1to's user avatar
  • 101
1 vote
1 answer
3k views

Chrooted user can't login with SSH

I created a new user with no shell access like this: useradd -g www -d /www/user01 -p ****** -s /sbin/nologin user01 Then in my sshd_config I add those lines: AllowUsers user01 user02 manager ...
H Aßdøµ's user avatar
1 vote
0 answers
568 views

Page displays "File not found" when I enable php-fpm chroot on debian wheezy apache2.2

I set up a chroot jail for a user "bob". bob is located in /var/jails/bob Bob has a site which is located in /var/jails/bob/bobssite.com/public_html Everything seems to work so far, including the ...
debian_server's user avatar
2 votes
2 answers
763 views

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 ...
user249398's user avatar
0 votes
2 answers
1k views

server side cd on sftp client connect

Is there a way with sftp to have it configured server-side to run a cd command when a client connects? I have my users thrown in to chroot, the folder has to be root:root chowned and cannot be ...
miethpo's user avatar
0 votes
1 answer
1k views

OpenBSD chroot for nginx/Apache file permissions

I haven't been able to find a satisfying answer on Goole or the various Stack forums: I noticed that files under /var/www (where nginx and I believe Apache are chrooted by default) have permissions ...
Brett's user avatar
  • 1
0 votes
0 answers
1k views

ProFTPD - User can't create directory when in a chroot jail

I've got a CentOS release 6.5 with Webmin and configured ProFTPd 1.34. I've put my users in a chroot jail. When they logon they are chrooted to their own home directory. But there is a problem when ...
sagittarius7's user avatar
0 votes
1 answer
4k views

Only allow user SSH access to one directory

I have a server running Centos 6.4 and I need to allow a freelancer access to one folder on the server to upload some code and do some testing - I have set their home directory in /etc/passwd to: ...
bhttoan's user avatar
  • 650
0 votes
1 answer
2k views

How to keep jailed users from changing directory to parent dirs?

I've chroot users with chroot_local_user=YES chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list and I'm the only user in the chroot_list file. Other users log in jailed but when they go ...
Jacksonkr's user avatar
  • 475
0 votes
1 answer
889 views

How do I properly chroot Nginx and uwsgi?

I have a pretty good idea of how to do this, I just wanted to make sure I wasn't going to be seriously screwing stuff up before I deployed it. I have a web application which uses uwsgi and nginx, and ...
user240252's user avatar
2 votes
1 answer
1k views

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/...
bro's user avatar
  • 191
2 votes
1 answer
2k views

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, ...
gone's user avatar
  • 209
1 vote
4 answers
1k views

How to give developer shell access to use GIT and manage code, nothing else?

In CentOS 6.5 (SElinux off, chroot) with Webmin/Virtualmin (latest version) I want to give a developer access to SSH within /home/site so he can use only git to manage the code. I also want to give ...
Gaia's user avatar
  • 1,895
0 votes
1 answer
498 views

How to chroot FreeRadius

I have set up FreeRADIUS 2.1.12 on Debian for authentication in a WPA2-Enterprise environment. Now I'd like to jail it with chroot. There is a parameter in radiusd.conf configuration file pointing to ...
Sven Menschner's user avatar
1 vote
1 answer
846 views

suPHP : proper use of the chroot feature

I started using suPHP recently, and I'm spending an amazing amount of time debugging the configurations and different compile options to get something that actually works. I've tried contacting the ...
John WH Smith's user avatar
3 votes
1 answer
3k views

VSFTPD how chroot not chrooted users in /home?

I need to chroot all local users to their home directories, but one user should have access to all user directories. If I put admin_user in chroot_list_file he has access for whole file system. I want ...
AIK's user avatar
  • 31
0 votes
1 answer
2k views

SFTP restrict users to a few directories

I run a game server and I have a few people that I want to give access too the server to help develop. I am trying to let them have access to only these directories /var/www/Update /root/gamed/config ...
tomirons's user avatar
  • 103
3 votes
1 answer
1k views

using /bin/bash in a chroot environment - symlink or mount

A user connects via ssh. The user is also chroot-ed to their home directory. The goal is security. Since the user is chroot-ed, when they login /bin/bash is not found. Obviously the user needs ...
csi's user avatar
  • 1,565
2 votes
1 answer
3k views

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 # ...
user1775888's user avatar
1 vote
2 answers
14k views

Chrooted ssh user cannot ssh into server : broken pipe

I just tried the following to add a new user, chroot the user and give him access to the folder /home/me/public_html via sftp and ssh : ##the following command are done by root or a sudo user useradd ...
rhand's user avatar
  • 264
1 vote
0 answers
321 views

ChrootDirectory for SFTP user in virtual host directory with write permissions and SuPHP

I am trying to give a SFTP user (user2) writeable access to a virtual host directory (website) in /var/www/mywebsite under Ubuntu 12.04. I have setup sshd_config to use Chrooting so that this user (...
Chrysippus's user avatar
3 votes
1 answer
820 views

df shows too much space on tmpfs

I have a server (SLES 11 running on a VMware hypervisor if that matters) with a tmpfs partition meant for mysql temporary tables, and I run mysql chrooted. df -h gives me strange outpupt: root@db12....
Roman Grazhdan's user avatar
2 votes
1 answer
468 views

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 ...
Nickersoft's user avatar
0 votes
0 answers
170 views

SSH chroot solution for Mutt

We have an environment tailored for our users to log in via ssh and instead of gaining access directly to a shell, users have a script in place of a shell. The script simply launches Mutt on the user'...
unixpipe's user avatar
3 votes
1 answer
4k views

openssh sftp chroot: two levels of access

I would like to achieve the following with OpenSSH's internal-sftp, chroot and Match directive: Users belonging to group sftpuser should have read and write access to /srv/sftp/{username} (or similar,...
Wuhtzu's user avatar
  • 346
3 votes
1 answer
2k views

build user chroot on first login

I'm using ldap for remote user authentication and I basically need to either figure out how to: a. chroot a user on machine b from machine a via nfs,(which doesn't seem possible without mounting ...
Rooster's user avatar
  • 505
9 votes
1 answer
2k views

Why is chroot system call not available to non root user?

I was reading description about setuid on wikipedia http://en.wikipedia.org/wiki/Setuid I was unable to understand how chroot is related to setuid as mention in following paragraph from wikipedia ...
Mr Coder's user avatar
  • 195
83 votes
5 answers
255k views

bad ownership or modes for chroot directory component

I created the user MY_USER. Set his home dir to /var/www/RESTRICTED_DIR, which is the path he should be restricted to. Then I edited sshd_config and set: Match user MY_USER ChrootDirectory /var/www/...
MultiformeIngegno's user avatar

1 2 3
4
5
9