I'm setting up a sftp server where clients will only have read-only access. They will log into their chroot directories, which is fine, but I need an admin account that can access/write to those directories.
/var/www/hosts <- admin chroot (root:root, 700)
-- /domain1 <- client1 chroot (root:root, 700)
-- /domain2 <- client2 chroot (root:root, 700)
-- /domain3 <- client3 chroot (root:root, 700)
all the sftp users go to the correct spots after login but the admin account can see the sub-directories but can't enter them and obviously can't write to it.
I've tried setting ACL permissions for the sub-directories which gives the admin account write access; this works but breaks client's sftp access because sshd reports a fatal error about incorrect chroot ownership/permissions and aborts the logins.
What can I do to solve me issue?