Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
16 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 ...
0
votes
1answer
42 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
0answers
33 views

Resolving host key verification failed on chroot system

I'm working on system where I'm doing A > B via .sh script and run some commands on B and exit. When I run A (Chroot user) > B It gives me host key verification failed from within chroot env,...
0
votes
1answer
69 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
53 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
35 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
34 views

Installing ca-certificates in a chroot in docker hangs

I'm trying to debootstrap a devuan install in a docker, which works fine as long as I don't include ca-certificates to the packages to be installed. Even if I wait for deboostrap to finish, and try to ...
0
votes
0answers
16 views

Postfix not resolving rDNS - Received marked as uknown

I'm trying to configure Spamassassin to whitelist some specific servers, but it seems that it can't work until Postfix will be able to find the hostname based on the IP address. PROBLEM Postfix is ...
0
votes
0answers
191 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
0answers
173 views

Linux: add an sftp user who can only access a web root subdirectory (not their home folder)

I see a lot of instructions on how to create an SFTP user and jail them to the /home/username directory. However, I want an SFTP user to only access a directory like this: /var/www/html/website.com/...
0
votes
1answer
270 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
285 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
334 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
1answer
3k 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
287 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 ...
1
vote
1answer
972 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
194 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
65 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
100 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
17 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
309 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
502 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
1k 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
368 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
1answer
2k 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
268 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
308 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
968 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
46 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 ...
3
votes
3answers
98 views

How to hide part of path in nginx error log

It is possible to configure nginx to output in error log specified part of files path? F.e: 2017/09/16 19:59:28 [error] 10656#10656: *1702 open() "/home/user/www/favicon.ico" failed (2: No such file ...
2
votes
1answer
107 views

Why did the postfix default change to non-chroot processes?

With compatibility_level=2 in recent postfix versions, the default for the postfix daemons changed from chroot to non-chroot. While the page describes that it changed and what you can do to continue ...
2
votes
2answers
715 views

A simple, step-by-step way of setting up of “jailed” SFTP-only accounts

I feel like I've gone through every SFTP/Chroot tutorial on the Internet, and not found what I am looking for (or, at least, none of them have produced the right results). Here's my specifics: I will ...
0
votes
1answer
779 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, ...
2
votes
2answers
2k views

Up-to-date alternatives of rssh or scponly [closed]

I need: An scp and sftp server With chroot-ed environment With non-login (ssh not allowed for scp/sftp users) Options and related issues I found: scponly No updates since more than 6 years Does ...
2
votes
2answers
227 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
1answer
306 views

nginx + php-fpm chdir not working

I'm meeting a problem with getting my nginx and php-fpm working. I'm getting an error 504 when I try to access my application. I have a structure like this; data/mywebsite/ | |---revisions/ |...
1
vote
2answers
985 views

Is chrooting possible with apache 2.4 on RHEL 7? Does it make sense to chroot ?

I did my research and found that people are unsure if chroot is helpful in security. I have these questions left unanswered. Is chrooting worthwhile if yes can it be done for httpd 2.4 on rhel 7?...
0
votes
1answer
424 views

sftp with chroot without ssh access [duplicate]

I'm trying to have some users able to sftp but not ssh. I've looked at OpenSSH: Difference between internal-sftp and sftp-server and Trying to ChrootDirectory an SFTP user to their home directory ...
2
votes
1answer
278 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 ...
0
votes
1answer
58 views

Create Linux user with no capabilities

How do I create a new user which has no capabilities? For instance, they should not be able to run any commands or view any directories (except for their home directory if necessary). The only ...
0
votes
1answer
212 views

Redirect output to /dev/tty1 outside chroot jail?

I couldn't figure out exactly how to word this in my searching; if someone could tell me what this is called and point me to a resource I would greatly appreciate it. TL;DR: For a CentOS installation,...
0
votes
1answer
648 views

Installing RPMs on system with no internet causes dependency conflicts: libstdc++.so.6, libm, etc

To avoid the XY problem, let me first describe the situation. We have a client project of unique circumstances. We have a relatively modern software stack (Keras DNN stuff) that needs to run on a ...
0
votes
1answer
1k 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
1answer
569 views

FTP over SSH chroot permissions

I'm trying to set up an upload directory on my server, and having the hardest time doing so. Uploads to the directory need to be accessible to all other users on the system, but the user account that ...
3
votes
3answers
857 views

postfix/smtp: fatal: unknown service: smtp/tcp – but /var/spool/postfix/etc/services exists

I am running a Debian GNU/Linux 8.7 box with Postfix 2.11.3-1 as MTA. All of a sudden, that is, with no change to the MTA setup, mails stopped being delivered, and the following error started showing ...
0
votes
1answer
2k views

PHP Error 500: Timezone database is corrupt - this should *never* happen

I have a fresh install of an Ubuntu Server 16.04 amd64 with apache 2.4.18 and php 7.0. I have chrooted the Apache with mod_env and ChrootDir /var/www in /etc/apache2/apache2.conf and far as I know is ...
1
vote
1answer
103 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/ └─── .....
0
votes
1answer
2k views

SFTP via port 22 or vsftp over port 20 / 21 - Best way to secure FTP access to a server

I've read many articles and questions on SF about this, and still can't figure out if the way I'm doing it is (a) possible, and (b) secure. The server is running on AWS EC2, and all access is via SSH ...
1
vote
1answer
679 views

Chroot doesn't work with php-fpm

i should use chroot for my ftp directory at my site: My php-fpm.conf: [mysite.com] listen = /var/run/php7-fpm-chroot-filemanager.sock chroot = /var/www/mysite.com/fileman chdir = / user = filemanuser ...
0
votes
1answer
809 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 ...