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
1answer
47 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 ...
0
votes
1answer
59 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/...
0
votes
1answer
32 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 ...
0
votes
0answers
15 views

Logging chrooted users with different socket/hide “/dev” folder

I have a few chrooted users on my sftp-server. Logging works as intended, but I have one simple question: Is it possible to hide the "/dev" folder for the users? My configuration now: module(load="...
0
votes
0answers
16 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 ...
0
votes
0answers
36 views

Disable “fatal: bad ownership or modes for chroot directory component” check in OpenSSH

I need to setup simple file sharing server. User logs in via SFTP (chrooted), uploads file and the file is available via nginx. The issue is that the disk space is mounted as a CIFS mount and the ...
0
votes
0answers
13 views

Patching a chroot

I used debootstrap to create a new Ubuntu 16.04 chroot on a Ubuntu 16.04 base system. I will patch the "main" OS monthly. I just realized that I hadn't really considered whether I would also go into ...
0
votes
0answers
36 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 ...
1
vote
0answers
36 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 ...
0
votes
0answers
171 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 ...
0
votes
1answer
41 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: ...
0
votes
1answer
131 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 ...
0
votes
0answers
43 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 ...
0
votes
0answers
21 views

OpenLDAP logging in chroot

Looking at the docs, OpenLDAP chroots before reading the config files so I suspect syslog logging won't work here? (local4.*) Not seeing anything there. Does OpenLDAP support log files in a chroot ...
1
vote
1answer
53 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 ...
0
votes
0answers
28 views

Install Debian into .img-file as normal user

Is it possible to install Debian from command line into a disk image file with no user privileges? I'd like to deploy these images to clients which always consist of the same hardware. These images ...
0
votes
0answers
46 views

SFTP user: chroot and “no shell” restrictions throwing mystery errors

With copious web content about how to set up an SFTP-only user that can only access their home directory, I didn't expect it to stump me, but there are two issues I can't get past. The directory ...
0
votes
1answer
279 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 ...
1
vote
0answers
42 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 ...
0
votes
1answer
245 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 ...
0
votes
0answers
27 views

phpfpm nginx chroot location alias try_files

nginx root: /srv/chroot1/www/public php chroot: /srv/chroot1/ Regarding to config pitfalls is not recomended to use path in script_filename; Config #1 location ~ (.*\.php)$ { try_files $...
1
vote
2answers
218 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
0answers
114 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 ...
0
votes
0answers
94 views

Issue Hardlink/Junction not working when chroot all users to c:/share dir in Windows OpenSSH Server 2019

Issue Hardlink/Junction not working when chroot all users to c:/share dir in Windows OpenSSH Server 2019. Link Created mklink /d E "E:" mklink /d F "F:" Entry in sshd_config file ChrootDirectory c:/...
1
vote
1answer
71 views

Jailkit/Chroot - Allow Less and More

I have the need to add the LESS and MORE commands to a jailed-user. I've attempted the following and can't quite get it to work: # which less;which more /usr/bin/less /usr/bin/more Now that I ...
0
votes
1answer
267 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 ...
1
vote
1answer
2k views

chroot, gpg-agent, and Ubuntu 18.04

For SFTP access to my server, I have created a sftp user that is limited to a working directory by chroot. Match User sftp-user AuthorizedKeysFile /home/sftp-user/.ssh/authorized_keys ...
0
votes
1answer
254 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 ...
2
votes
0answers
118 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 ...
0
votes
1answer
84 views

OpenSSL-related linker error while building PHP 5.3.3

While trying to build PHP 5.3.3 on Debian jessie (save yourself some sanity by not asking why) with OpenSSL extension enabled, I encountered undefined reference to symbol 'X509_free@@OPENSSL_1.0.0' in ...
0
votes
0answers
499 views

Segmentation fault when building centos 5 chroot

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
1answer
510 views

mariadb in chroot gives Access denied for user 'root'@'localhost' even though password is set

I have a script that runs mariadb in a chroot, its a qemu-arm-static rasoberrypi chroot but I don't that that should change much. The script installs and then sets the password for mariadb root user, ...
0
votes
1answer
907 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 ...
4
votes
1answer
791 views

Bind mount - different results on CentOS 6 and CentOS 7

I'm mounting couple of directories (bind mount) in a chroot environment, but they behave differently on CentOS 6 and 7 - exactly the same commands. Example: I have my chroot env in /chroot/base. ...
2
votes
3answers
8k views

yum/rpm Failed to initialize NSS library in chroot

I am performing a yum update from CentOS 7.4 to CentOS 7.5, when nspr and nss soft-softoken receive the updates, I am left with the following error: yum update nspr error: Failed to initialize NSS ...
0
votes
1answer
1k views

How to properly chroot when using key based authentication within openssh-server

I'm running a Debian Stretch x86_64 server, with OpenSSH_7.4p1 Debian-10+deb9u3, OpenSSL 1.0.2l 25 May 2017. I want to use chroots in combination with OpenSSH server's internal SFTP system. My ...
2
votes
2answers
5k 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 ...
0
votes
1answer
662 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 ...
0
votes
1answer
87 views

vsftpd and chroot: can i share the chroot folder between two users?

I have a vsftpd installation with chroot enabled and root access disabled. Everything work flawlessy, but I need to accomplish this. When user1 log into ftps, it log in /home/user1. Same for user2, ...
0
votes
2answers
242 views

Chroot on subdirectory from home website (SFTP)

On a Debian apache2 server I'm trying to give access on a subdirectory of a webstie tree (Website home dir : /home/website/public_html/, access wanted only for a specific user: /home/website/...
1
vote
0answers
20 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
0answers
539 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 ...
1
vote
2answers
810 views

Can't start sessions in chrooted nginx php-fpm environment in FreeBSD

I have a FreeBSD 11 machine running latest Nginx and PHP-FPM in chrooted mode. Everything worked fine, until I added start_session(); to index.php. This is when I received the following error: ...
1
vote
1answer
3k views

Vsftpd not displaying files and folder

I run vsftpd: version 3.0.2 on Debian 8. I have a folder /home/vsftpd/$USER which is mounted on an NFS. $USER is replaced by the user name connected on the FTP. Those users are authenticated against ...
0
votes
2answers
633 views

Chroot Jailing of an user to their home with PHP CLI and everything to run Magento 2 CLi commands

Ok, so first off I'm pretty sure there's gonna be a load of "additional info" requests so please post them in the OP comments and I'll do my best to provide extra info on request! Here's the skinny, ...
1
vote
2answers
3k views

Logging Chrooted SFTP user activity

I have been trying to log SFTP activity by Chrooted user. I have not been able to log a single line so far for any chrooted user. For regular users it works. My current settings: /etc/ssh/...
0
votes
2answers
384 views

Debian - chroot ntpd Issues

I would like to configure the ntp daemon inside a chroot enviroment. The OS I am suing is Debian 9.1, kernel 3.16.0-4-686-pae The service run as: /usr/sbin/ntpd -p /var/run/ntpd.pid -i /var/chroot/...
0
votes
1answer
437 views

ssh chroot to lxc container

I have a PC with sshd service (192.168.1.1). The PC contains two users user1 and user2. I installed lxc service and configured a container. How can I configure ssh server on 192.168.1.1 that ...
0
votes
1answer
2k views

How to chroot accounts for using scp in Amazon Linux?

I need to setup an scp server. Suppliers will upload files to that server via scp (not sftp). While configuration was easy for sftp, I really struggle with scp. There are some instructions and how-tos ...
0
votes
1answer
114 views

How to get usernames to show in chrooted SFTP?

Under normal SFTP, I see owner and group usernames. Under chrooted SFTP (via internal-sftp in sshd_config), I see numeric user IDs for owner and group. What do I need to do to get usernames to show ...

1
2 3 4 5
8