This is due to the way that root permissions are interpreted at the higher-level directories in which the SFTP user is contained. Only subdirectories of the chroot jail are writable. As with any proper chroot operation, this configuration does not provide write access to the chroot directory. Important: The steps in this article do not work with RHEL® 7 or CentOS® 7. These instructions are for adding a single domain (SFTP user), but you could potentially It’s important to ensure that the SFTP user added is added to the SFTP group.
It’s important to log in and test that the SFTP user is working correctly. It’s important to ensure the chroot user has write access to the specified DocumentRoot. Other directoriesĬan (and should) be owned (and writable) by the user. The home directory of the SFTP user must be owned by root:root. Only jail additional users so that you don’t prevent the root user from performing operations correctly.īefore you begin, review the following best practices:
WARNING: Do not try to jail the root user.
#SFTP SETUP FOR MULTIPLE USERS ON LINUX HOW TO#
This article shows you how to create secured SSH File Transfer Protocol (SFTP) users that are restricted or jailed to their home directories.