SFTP Gateway AWS Disable Folders
Overview
By default, SFTP users are configured with an uploads and local folder.
For details on how these folders work, see this article.
There are times when you don't want your users to have either of these folders:
- You use SFTP Gateway to upload files for archival purposes,
and you don't want your users accidentally dropping files in the
localdirectory. - You just want to temporarily transfer files with an external vendor,
and you don't want to confuse them by displaying the
uploadsdirectory.
Enabling and disabling default folders
When creating an SFTP user, you can choose which default folder(s) you wish to enable:
uploadslocalshareddownloads

When you click Save, the SFTP user will be configured with only the default folders that you specify.

Editing an SFTP user's default folders
When you enable any of the default folders, they appear for your SFTP user.
When you disable the shared folder, this folder disappears automatically.
But when you disable either the uploads, local, or downloads folders,
these do not disappear automatically. You will need to
SSH into the server and remove them manually, using the command:
rm -rf <folder-name>
This is by design. We feel that deleting data should be intentional. So, in order to delete existing folders, you will need to manually do so at the command line. After having done so, the disabled folder will no longer appear for the SFTP user.
Note: The reason why the shared folder can be removed automatically
is because no data is actually being deleted. Instead, the shared folder
is simply unmounted. The files still reside in /opt/sftpgw/shared/.