EnvironmentUbuntu 14.04.1 LTS server editionOpenSSH_6.6.1p1 Ubuntu-2ubuntu2, OpenSSL 1.0.1f 6 Jan 2014Current ConfigurationSFTP password-protected accounts are setup for Alice and Bob. Their home directories are located at/sftp/alice//sftp/bob/Both accounts are chrooted which prevents them from leaving their home directory. SSH access is also disabled.Desired ConfigurationAlice and Bob should be allowed to create sub-directories, inside their home directories, and assign a username and password to said directories. For example/sftp/alice/stuff_for_chrisusername: chrispassword: my_stuffAlice then tells chris to SFTP to chris@example.com where he can download his files. Chris should only have read access to /sftp/alice/stuff_for_chrisQuestionCan SFTP accomplish this or do I need to use something like ProFTPD ?
Allow SFTP users to create sub-accounts
ssh;sshd
As far as I know you cannot do this with SFTP nor ProFTPD. What I have done in the past with a similar requirement is to have program that runs as root scan the toplevel directories for an agreed upon file (in your case agreed upon with Alice and Bob e.g. account.new). Based on the content of that file the script run by root takes the appropriate actions, for which it has all the rights necessary.Care should be taken not to execute any commands from account.new but interpret the contents and base a restricted set of actions on that content. The file could contain lines like create charlesdelete donalddeactivate ericactivate fionaThe program that runs as root could be a daemon that regularly checks the relevant directories for such a file, or if speed is important get triggered by inotify.