Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
github.com/drakkan/sftpgo
Fully featured and highly configurable SFTP server with optional FTP/S and WebDAV support, written in Go. It can serve local filesystem, S3 (compatible) Object Storage, Google Cloud Storage and Azure Blob Storage.
SFTPGo is developed and tested on Linux. After each commit, the code is automatically built and tested on Linux, macOS and Windows using a GitHub Action. The test cases are regularly manually executed and passed on FreeBSD. Other *BSD variants should work too.
Binary releases for Linux, macOS, and Windows are available. Please visit the releases page.
An official Docker image is available. Documentation is here.
Some Linux distro packages are available:
git
, gcc
and go
to build.git
, gcc
and go
to build.git
, gcc
and go
to build.You can easily test new features selecting a commit from the Actions page and downloading the matching build artifacts for Linux, macOS or Windows. GitHub stores artifacts for 90 days.
Alternately, you can build from source.
A full explanation of all configuration methods can be found here.
Please make sure to initialize the data provider before running the daemon!
To start SFTPGo with the default settings, simply run:
sftpgo serve
Check out this documentation if you want to run SFTPGo as a service.
Before starting the SFTPGo server please ensure that the configured data provider is properly initialized/updated.
SQL based data providers (SQLite, MySQL, PostgreSQL) require the creation of a database containing the required tables. Memory and bolt data providers do not require an initialization but they could require an update to the existing data after upgrading SFTPGo.
For PostgreSQL and MySQL providers, you need to create the configured database.
SFTPGo will attempt to automatically detect if the data provider is initialized/updated and if not, will attempt to initialize/ update it on startup as needed.
Alternately, you can create/update the required data provider structures yourself using the initprovider
command.
For example, you can simply execute the following command from the configuration directory:
sftpgo initprovider
Take a look at the CLI usage to learn how to specify a different configuration file:
sftpgo initprovider --help
You can disable automatic data provider checks/updates at startup by setting the update_mode
configuration key to 1
.
After starting SFTPGo you can manage users and folders using:
To support embedded data providers like bolt
and SQLite
we can't have a CLI that directly write users and folders to the data provider, we always have to use the REST API.
Some step-to-step tutorials can be found inside the source tree howto directory.
Custom authentication methods can easily be added. SFTPGo supports external authentication modules, and writing a new backend can be as simple as a few lines of shell script. More information can be found here.
Keyboard interactive authentication is, in general, a series of questions asked by the server with responses provided by the client. This authentication method is typically used for multi-factor authentication.
More information can be found here.
A user can be created or modified by an external program just before the login. More information about this can be found here.
SFTPGo allows to configure custom commands and/or HTTP notifications on file upload, download, delete, rename, on SSH commands and on user add, update and delete.
More information about custom actions can be found here.
Directories outside the user home directory can be exposed as virtual folders, more information here.
You can get notified as soon as a new connection is established using the Post-connect hook and after each login using the Post-login hook. You can use your own hook to check passwords.
Each user can be mapped to the whole bucket or to a bucket virtual folder. This way, the mapped bucket/virtual folder is exposed over SFTP/SCP/FTP/WebDAV. More information about S3 integration can be found here.
Each user can be mapped with a Google Cloud Storage bucket or a bucket virtual folder. This way, the mapped bucket/virtual folder is exposed over SFTP/SCP/FTP/WebDAV. More information about Google Cloud Storage integration can be found here.
Each user can be mapped with an Azure Blob Storage container or a container virtual folder. This way, the mapped container/virtual folder is exposed over SFTP/SCP/FTP/WebDAV. More information about Azure Blob Storage integration can be found here.
Adding new storage backends is quite easy:
GetFilesystem
to return the new backendportable
modeAnyway, some backends require a pay per use account (or they offer free account for a limited time period only). To be able to add support for such backends or to review pull requests, please provide a test account. The test account must be available for enough time to be able to maintain the backend and do basic tests before each new release.
The connection failed logs can be used for integration in tools such as Fail2ban. Example of jails and filters working with systemd
/journald
are available in fail2ban directory.
Details information about account configuration properties can be found here.
SFTPGo can easily saturate a Gigabit connection on low end hardware with no special configuration, this is generally enough for most use cases.
More in-depth analysis of performance can be found here.
SFTPGo releases are feature-driven, we don't have a fixed time based schedule. As a rough estimate, you can expect 1 or 2 new releases per year.
SFTPGo makes use of the third party libraries listed inside go.mod. Some code was initially taken from Pterodactyl SFTP Server. We are very grateful to all the people who contributed with ideas and/or pull requests.
GNU GPLv3
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.