We are looking for a way to allow users to upload files using SFTP to a directory on a webserver. The directory is part of an NFS share. The requirements are that the SFTP server is not the same machine as the webservers and looking for a secure solution. So far, I have tried using scponly to create chrooted jails for each user to have SFTP access and used mount --bind to mount just their directory of the NFS share inside their jail. As one would expect, I am having problems with permissions on the files.
Does anyone know of any solutions to this? I have run out of ideas on how to accomplish this task. Sorry if my description is a little confusing, I can include a diagram if needed.