Wiki

Clone wiki

sftpgateway-public / Adding S3 Download Directory Support

** DRAFT ****

Adding Download Directory Support to an Existing SFTP Gateway Instance

Starting with version 1.003 SFTP Gateway now supports bi-directional file syncing with Amazon S3. Files uploaded to users uploads directory will continue to be sent to S3 as soon as they are done transferring to the SFTP Gateway server. Version 1.003 creates two additional directories for each user account - shared and downloads.

Files in an SFTP Gateway user's shared directory map to a single S3 bucket path that is shared with ALL SFTP Gateway users on a single SFTP Gateway server instance. As an administrator, you can place files in this S3 folder using the AWS S3 console, and they will be available to download from each SFTP Gateway user's shared directory in their SFTP home directory.

Files in the SFTP Gateway user's downloads directory map to a single S3 bucket path for that particular user only. As an administrator, you can place files in the S3 download folder for user "Bob" using the AWS S3 Console and they will be available in Bob's downloads folder only.

These directories are setup by default when launching a new instance of SFTP Gateway version 1.003.

If you have an existing SFTP Gateway instance that is version 1.002 or older, follow these instructions for upgrading and setting up the shared and download directories for each user.

  1. Log into the SFTP Gateway server via ssh as the ec2-user.

  2. Update SFTP Gateway application binaries by running sudo sftpgw update. If you are using version prior to 1.002, please refer to these instructions for instructions on how to upgrade.

  3. Run sudo sftpgatewaysetup to setup the file system as needed to support download directories. Starting with version 1.003 this command will no longer overwrite existing sftpgateway properties in the /home/ec-user/.sftpgateway/sftpgateway.properties file.

  4. Run sudo addsftpuser bob for each EXISTING user that you want to add download directory support. Starting in version 1.003, this command will no longer terminate if that user already exists. For existing users, it will add the new directories and download support.

Please contact us at support@thorntech.com if you have any questions about setting up S3 Download Directories.

Updated