1

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:sftpjail /home/ftest
755 ftest:nginx /home/ftest/test1
755 ftest:sftpjail /home/ftest/test2
777 ftest:nginx /home/ftest/test3

The chroot sftp login is working just fine, but unfortunately it's not possible to write to any of the testX folders.

1 Answers1

0

The problem is the ftest user doesn't have write permissions on his home directory.

/home/ftest is owned by root user and sftpjail group. ftest is indeed a member of sftpjail, but the 755 permission means the group can only read, not write from there.

You have 2 options here, either change the ownership to ftest:sftpjail, and keep the permissions 755, or keep theownership as is, but change permissions to 775.

I believe creating files inside the test folders is working fine though, right?

Waleed Hamra
  • 751
  • 6
  • 16