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.
104
questions with no upvoted or accepted answers
3
votes
1
answer
1k
views
Error using dnssec-signzone in chroot'd bind 9.8 when a zone file includes other files
Using bind 9.8.2 on RHEL 6.5, running chroot'd.
I have a zone file that includes other files (it's a zone with a large number of servers in different datacenters, and there's one included file per ...
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:
...
3
votes
1
answer
2k
views
Increasing permissiveness/permissions for umask + openssh + chrooted SFTP server using internal-sftp
The suggestion found at these links works for me:
How to setup ssh's umask for all type of connections
http://ubuntuforums.org/showthread.php?t=1107974#5
Summary: Use PAM to inject the umask, ...
2
votes
0
answers
377
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 ...
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 ...
2
votes
0
answers
259
views
internal-sftp on chroot jail disconnects with status 1?
Server: Ubuntu 18.04.1 LTS
SSHD: OpenSSH_7.6p1 Ubuntu-4, OpenSSL 1.0.2n
I have created a test user sftpuser and sftp group to try logging in through a WinSCP client, as a start. In sshd_config I ...
2
votes
0
answers
988
views
dns resolving fails in php-fpm chroot using docker
Using Docker, I am trying to set up nginx + nextcloud:fpm in a chroot environment.
It's all set up and working so far except that the software reports that it cannot connect to the internet, the ...
2
votes
1
answer
715
views
Is ssh's 'ChrootDirectory' feature considered secure?
I know that a chroot is generally not considered secure and was not designed as a security feature. So my questions are:
Am I correct, that chrooting an ssh user (with ChrootDirectory) is unsafe and ...
2
votes
0
answers
808
views
run commands in schroot environment from chroot host (outside chroot)?
I have a program to run in a schroot environment. I can run like this without an error:
user@precise:~$ schroot -c trusty
(trusty)user@precise:~$ myprogram.sh my.Rmd
However, when I call the script ...
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-...
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 ...
1
vote
0
answers
222
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
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 ...
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 ...
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 ...
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/...
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 \
--...
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 ...
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 ...
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 ...
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 ...
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?
...
1
vote
0
answers
25
views
Cache memory with Chroots
I have a server with many chroots, each one used by a different group of users. Most of them use Jupyter Notebooks that store variables in memory for as long the notebooks remain open. The output of ...
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 ...
1
vote
1
answer
220
views
Protecting Directories in a chroot'ed root fs
So we're trying to retrofit an older ftp drop off server that also doubles as a rsync endpoint. In each user
chroot there's a directory structure that looks like this:
/.
├─── usr/
├─── lib/
└─── .....
1
vote
0
answers
2k
views
Chroot local VSFTPD users into their own respective directories
So I have been really struggling the past few days trying to get an FTPES chrooted instance of vsftpd set up on Red Hat 7.3.
The objective is to have external users login only to their respective ...
1
vote
1
answer
499
views
Isolating Apache virtualhosts using linux container
I have a web server host (Apache on Linux) that runs many virtual hosts which offer CGIs and FastCGIs using 'chroot' to seperate the processes from each other.
For serveral reasons I am thinking of ...
1
vote
1
answer
541
views
SFTP chroot to /var/www stopped working
04 and setup sftp chroot to /var/www for our 2 developers. I followed the guide available online (referenced a few other as well)
http://www.krizna.com/ubuntu/setup-ftp-server-on-ubuntu-14-04-vsftpd/
...
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 ...
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 ...
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 ...
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 (...
1
vote
0
answers
2k
views
Pure-FTPD: chroot doesn't chroot
On a Debian Wheezy machine, I've installed Pure-FTPD. As I wanted the users to be chrooted into their home directories, I took a look at the virtualchroot functionality.
After a bit of configuration, ...
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 ...
1
vote
0
answers
354
views
Built in chroot jail RHEL 5 returns No such file or directory
I need to create a chroot jail on my RHEL5 production server to allow a specific user to work with the less right possible, but with GIT.
Here is my system configuration :
RHEL 5 : Release 5.10
...
1
vote
0
answers
496
views
Mounting /var/www for File recovery
I'm in the process of recovering my server's files in a "Rescue" mode. Its a Ubuntu 12.04 with 2x3TB in RAID1. The instructions were to SSH into the server in "Rescue" mode, mount the partitions, ...
1
vote
1
answer
1k
views
Add write permissions for chroot user on centOS 6
I've a jailed user "ftest" (in /home/ftest) but he can't create files or folders within the jail.
User was added by:
useradd -g nginx -G sftpjail -s /bin/false
Permissions and owners are:
755 root:...
1
vote
2
answers
956
views
Setting up chrooted shell accounts with schroot and debootstrap on Ubuntu 10.04
UPDATE:
I never did get this figured out. Instead i ended up jsut using jailkit since there is a ton (though sometimes outdated) documentation on usage. Id still be interested in knowning how to get ...
1
vote
0
answers
88
views
Chrooted from LiveCD: Bad IO performace
my Ubuntu Server installation is broken, so I grabbed a Ubuntu Desktop CD, mounted my Ubuntu installtion on my hard disk and chrooted into it.
But now my IO performance is really bad:
# time dd if=/...
1
vote
1
answer
1k
views
SSH - SFTP/SCP only + additional command running in background
there are many solutions described to get ur SSH-connection forced to only run SFTP by modifying the sshd_config by adding a new group match and give that new group a Forcecommand internal-sftp
Well ...
1
vote
1
answer
377
views
Chroot / sFtp / Ftps Problems
regular debian admin, i am faced to a complex situation and i appreciate your advices...
I have a server with chroot environment that is working without problems up to now :
Chroot user : store
...
1
vote
1
answer
691
views
installing debian with debootstrap and lxc instead of debootstrap and chroot
So I need to 'install' (or rather prepare a root filesystem for) a Debian system and that was done with debootstrap and chroot before. However due to the not-very-existent isolation of chroots (with ...
1
vote
2
answers
890
views
PHP-FPM, chroot, Ubuntu Precise 12.04, and no access to DNS
There's a plenty of advices across the Internet on how to enable DNS in chroot.
The problem is that there's no /lib/libnss* files in the Ubuntu Precise.
I've tried to copy these files from /etc/: ...
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 ...
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 ...
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 ...
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 ...
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] [...
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 ...
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 ...