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.
417
questions
0
votes
2
answers
3k
views
Ubuntu FTP user has access to every directory
I just created a new user on Ubuntu Server 16.04.3 LTS with useradd. I have vsftpd installed, and #chroot_local_user=YES still commented out. Yet when i connect with my user through FTP to my server, ...
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'...
0
votes
2
answers
156
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 ...
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.
...
1
vote
1
answer
132
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 ...
3
votes
2
answers
829
views
How to let OPcache work correctly under chroot?
There is PHP-FPM and OPCache (downloaded and compiled from php.net)
opcache.enable = 1
opcache.use_cwd = 1
zend_extension=opcache.so
php-fpm profiles run in chroot, i.e. /home/user1/www/index.php -&...
0
votes
0
answers
64
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 ...
0
votes
1
answer
453
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, ...
0
votes
1
answer
280
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 ...
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 ...
2
votes
3
answers
574
views
vsftpd and home directories of chrooted local users
NOTE: Users are chrooted and their local_root is set to /srv/ftp.
Why vsftpd forces local chrooted users to have home directory? It will refuse to work if there is not any. And I've found the ...
0
votes
0
answers
78
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 ...
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 ...
1
vote
0
answers
266
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 ...
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 ...
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 ...
1
vote
1
answer
210
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 ...
2
votes
1
answer
471
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 ...
0
votes
0
answers
302
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] [...
0
votes
0
answers
183
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 ...
11
votes
3
answers
27k
views
Chroot SFTP - Possible to allow user to write to current (chroot) directory
I currently have a WORKING SFTP login, using a private key for login and the user is chroot'ed into their home directory.
Goal: Keep the user chroot but allow WRITE access to the relative chroot ...
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 "...
22
votes
6
answers
23k
views
OpenSSH anything like 'internal-sftp' but for SCP?
I'm running Debian stable and I'm looking to establish the following environment for users in my 'sftponly' group:
jailed
can transfer with SFTP
can transfer with SCP
cannot login interactively with ...
83
votes
5
answers
257k
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/...
2
votes
4
answers
3k
views
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 ...
1
vote
1
answer
2k
views
lock ftp user in home directory
I have read, researched, tested, and still cannot seem to get this working correctly.
I am running VSFTPD on Debian. With a test account configured to point the user's home directory to a mount point ...
0
votes
1
answer
2k
views
Chroot a user in Amazon EC2 instance
I've got an Amazon Linux AMI machine running 2016.09 version. I've recently created a user and I'm able to connect using its credentials (private key).
This user is intended to be used by a third ...
15
votes
3
answers
8k
views
Why chroot is considered insecure?
I've been playing around with CentOS box for couple of years now. So I'm pretty comfy with terminal. However, I read a lot of blog-post claiming that chroot is insecure and amount of those posts ...
1
vote
1
answer
3k
views
Installing Redhat repositories in a chroot jail with no repositories installed
I have installed software that runs in a chroot jail in Redhat 7.3. Unfortunately, there are no repositories installed in this jail, so I can not download the packages I need through yum. I would like ...
0
votes
2
answers
2k
views
Enabling ChrootDirectory breaks my SFTP on AWS, gives error for wrong dir
I'm trying to set up an SFTP server on AWS that multiple customers can use to upload data securely. It is important that they are not able to see the data of any other customer, and to do that I need ...
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 ...
3
votes
2
answers
2k
views
Setup secure shared hosting (Apache, PHP, MySQL)
So I'm setting up a shared hosting with Apache, PHP, MySQL and the biggest question mark is how to do with PHP, since there is a million options out there how to configure it securely.
The plan is:
...
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/...
0
votes
1
answer
2k
views
VSFTPD Cant perform anon uploads. 500 OOPS
I can't get my vsftpd config to allow anon root uploads.
$ vsftpd -v
$ vsftpd: version 3.0.2
$ cat /etc/vsftpd.conf
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are ...
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 ...
1
vote
1
answer
2k
views
Is it possible to run dhcpd3 as non-root user in a chroot jail?
I would like to run dhcpd3 from a chroot jail on Debian Lenny. At the moment, I can run it as root from my jail.
Now I want to do this as non-root user (as "-u blah -t /path/to/jail" Bind option).
...
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
...
0
votes
0
answers
196
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 ...
1
vote
0
answers
65
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 ...
2
votes
1
answer
3k
views
SFTP client can't write to own home directory when chrooted there
This is a tougher variant of the previous question bad ownership or modes for chroot directory component.
In that other question, we learn that openssh refuses to chroot a user to its own home ...
0
votes
1
answer
165
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 ...
1
vote
2
answers
448
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 ...
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 ...
14
votes
4
answers
20k
views
Why is "chroot" never used on Mac OS X?
I've been using Macs for 25 years, and "UNIX" since OS X 10.0.. but I've never really thought much about chroot, nor have I ever really needed or wanted to...
It's a simple question, but... under ...
0
votes
1
answer
2k
views
Segmentation fault when building centos 5 chroot [closed]
For some legacy application I decided to use chroot with CentOS 5.
I did install CentOS 5 on virtual machine, then I boot virtual machine with live CD and using tar, I "copied" the files from the ...
0
votes
1
answer
128
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 ...
1
vote
2
answers
2k
views
Jailkit not locking down SFTP, working for SSH
I installed jailkit on my CentOS 5.8 server, and configured it according to the online guides that I found. These are the commands that were executed as root:
mkdir /var/jail
jk_init -j /var/jail ...
0
votes
2
answers
2k
views
vsftpd with chroot_local_user requires client certificate
When setting up my FTPS server I want to enable chroot_local_user. When disabled everything works fine. If I enable this however, WinSCP fails to connect and claims I need a client certificate to ...
4
votes
5
answers
24k
views
User can't SFTP after chroot
Ubuntu 10.04.4 LTS
I'm trying to chroot the user 'sam'. According to all the articles out there this should work, but apparently I'm still doing something wrong.
The user:
sam:x:1005:1006::/home/...
0
votes
2
answers
2k
views
Publish network services using Systemd machinectl
TL;DR: How to expose network services to the host through machinectl/nspawn containers?
I'm trying to make things perfectfor my setup, i.e. installing my services in separated chroot instances.
To ...