Article 5701S sftp setup on Centos 7

sftp setup on Centos 7

by
cxc718
from LinuxQuestions.org on (#5701S)
Centos 7.6

Having some difficulty figuring out the problem with an sftp setup. I was given a specific directory a user must be able to sftp files to.

The test user can login and is locked into their homedir, but cannot create/upload new files.

user is 'testsftp', and is a member of group sftpusers.

Here is my sftp config:

relevant section of sshd_config:
Subsystem sftp internal-sftp
Match Group sftpusers
ChrootDirectory /u2/sftp/%u

in /u2/sftp:
(output of ls -alrt)

ls -alrt

total 0

drwxr-xr-x 5 root root 41 Aug 7 15:11 ..

drwxr-xr-x 2 testsftp sftpusers 27 Aug 14 08:15 files

drwxr-xr-x 4 root root 35 Aug 14 09:32 .

drwxr-xr-x 2 root root 6 Aug 14 10:27 testsftp

My first thought was that the 'testsftp' directory was owned by root. So I tried changing the user:group ownership to testsftp:sftpusers.
The result of that was the testsftp user could no longer login.

(Using winscp for testing the logins).

My desired end result is that the testsftp user logs in, is chrooted to the /u2/sftp/testsftp directory, and has full perms in that directory.
What am I missing here?latest?d=yIl2AUoC8zA latest?i=PT9mFq0AuuA:1qMtsGUuSYw:F7zBnMy latest?i=PT9mFq0AuuA:1qMtsGUuSYw:V_sGLiP latest?d=qj6IDK7rITs latest?i=PT9mFq0AuuA:1qMtsGUuSYw:gIN9vFwPT9mFq0AuuA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments