Nicola Murino
4ebedace1e
systemd unit: run as "sftpgo" system user
...
Update the docs too
Fixes #177
2020-09-25 18:23:04 +02:00
Stephan Müller
b23276c002
Set verbosity for go commands in docker build ( #174 )
2020-09-21 19:33:44 +02:00
Nicola Murino
bf708cb8bc
osfs: improve isSubDir check
2020-09-21 19:32:33 +02:00
Nicola Murino
a550d082a3
portable mode: advertise WebDAV service if requested
2020-09-21 16:08:32 +02:00
Nicola Murino
6c1a7449fe
ssh commands: return better error messages
...
This improve the fix for #171 and return better error message for
SSH commands other than SCP too
2020-09-19 10:14:30 +02:00
Nicola Murino
f0c9b55036
dataprovider: improve user validation errors
...
Fixes #170
2020-09-18 19:21:24 +02:00
Nicola Murino
209badf10c
scp: return better error messages
...
Fixes #171
2020-09-18 19:13:09 +02:00
Nicola Murino
242dde4480
sftpd: ensure to always close idle connections
...
after the last commit this wasn't the case anymore
Completly fixes #169
2020-09-18 18:15:28 +02:00
Nicola Murino
2df0dd1f70
sshd: map each channel with a new connection
...
Fixes #169
2020-09-18 10:52:53 +02:00
Nicola Murino
98a6d138d4
sftpd: add a test case to ensure we return sftp.ErrSSHFxNoSuchFile ...
...
if stat/lstat fails on a missing file
2020-09-17 12:30:48 +02:00
Nicola Murino
38f06ab373
ftpd: fix TLS for active connections
...
See https://github.com/fclairamb/ftpserverlib/issues/177
Some minor doc improvements
2020-09-17 09:45:40 +02:00
Nicola Murino
3c1300721c
add some basic how-to style documents
2020-09-13 19:43:56 +02:00
Nicola Murino
61003c8079
sftpd: add lstat support
2020-09-11 09:30:25 +02:00
Nicola Murino
01850c7399
REST API: remove status from ApiResponse
...
it duplicates the header HTTP status
2020-09-08 09:45:21 +02:00
Nicola Murino
b9c381e26f
sftpd: update pkg/sftp
...
The patch to open a file in read/write mode is now merged
2020-09-06 11:40:31 +02:00
Nicola Murino
542554fb2c
replace the library to verify UNIX's crypt(3) passwords
2020-09-04 21:08:09 +02:00
Nicola Murino
bdf18fa862
password hashing: exposes argon2 options
...
So the hashing complexity can be changed depending on available
memory/CPU resources and business requirements
2020-09-04 17:09:31 +02:00
Nicola Murino
afc411c51b
adjust runtime.GOMAXPROCS to match the container CPU quota, if any
2020-09-03 18:09:45 +02:00
Nicola Murino
a59163e56c
multi-step auth: don't advertise password method if it is disabled
...
also rename the settings to password_authentication so it is more like
OpenSSH, add some test cases and improve documentation
2020-09-01 19:34:40 +02:00
Giorgio Pellero
8391b19abb
Add password_disabled bool to sftpd config, disables password auth callback ( #165 )
2020-09-01 19:26:33 +02:00
Nicola Murino
3925c7ff95
REST API/Web admin: add a parameter to disconnect a user after an update
...
This way you can force the user to login again and so to use the updated
configuration.
A deleted user will be automatically disconnected.
Fixes #163
Improved some docs too.
2020-09-01 16:10:26 +02:00
Nicola Murino
dbed110d02
WebDAV: add caching for authenticated users
...
In this way we get a big performance boost
2020-08-31 19:25:17 +02:00
Giorgio Pellero
f978355520
Fix "compatible" typo in README.md ( #162 )
2020-08-31 13:43:24 +02:00
Nicola Murino
4748e6f54d
sftpd: handle read and write from the same handle ( #158 )
...
Fixes #155
2020-08-31 06:45:22 +02:00
Nicola Murino
91a4c64390
fix initprovider exit code for MySQL and PostgreSQL
2020-08-30 14:00:45 +02:00
Nicola Murino
600a107699
initprovider: check if the provider is already initialized
...
exit with code 0 if no initialization is required
2020-08-30 13:50:43 +02:00
Nicola Murino
2746c0b0f1
move stat to base connection and differentiate between Stat and Lstat
...
we will use Lstat once it will be exposed in pkg/sftp
2020-08-25 18:23:00 +02:00
Nicola Murino
701a6115f8
ftpd: use ftpserverlib master, the tls patch is now merged
2020-08-24 23:06:10 +02:00
Nicola Murino
56b00addc4
docker: try to improve the docs
...
See #159
2020-08-24 15:46:31 +02:00
Nicola Murino
02e35ee002
sftpd: add Readlink support
2020-08-22 14:52:17 +02:00
Nicola Murino
5208e4a4ca
sftpd: improve truncate
...
quota usage and max allowed write size are now properly updated after a
truncate
2020-08-22 10:12:00 +02:00
Nicola Murino
7381a867ba
fix truncate test cases on Windows
2020-08-20 14:44:38 +02:00
Nicola Murino
f41ce6619f
sftpd: add SSH_FXP_FSETSTAT support
...
This change will fix file editing from sshfs, we need this patch
https://github.com/pkg/sftp/pull/373
for pkg/sftp to support this feature
2020-08-20 13:54:36 +02:00
Nicola Murino
933427310d
fix check pwd hook when using memory provider
2020-08-19 19:47:52 +02:00
Nicola Murino
8b0a1817b3
add check password hook
...
its main use case is to allow to easily support things like password+OTP for
protocols without keyboard interactive support such as FTP and WebDAV
2020-08-19 19:36:12 +02:00
Nicola Murino
04c9a5c008
add some examples hooks for one time password logins
...
The examples use Twillo Authy since I use it for my GitHub account.
You can easily use other multi factor authentication software in a
similar way.
2020-08-18 21:21:01 +02:00
Nicola Murino
bbc8c091e6
portable mode: add WebDAV support
2020-08-17 14:08:08 +02:00
Nicola Murino
f3228713bc
Allow individual protocols to be enabled per user
...
Fixes #154
2020-08-17 12:49:20 +02:00
Nicola Murino
fa5333784b
add a maximum allowed size for a single upload
2020-08-16 20:17:02 +02:00
Nicola Murino
0dbf0cc81f
WebDAV: add CORS support
2020-08-15 15:55:20 +02:00
Nicola Murino
196a56726e
FTP improvements
...
- add a setting to require TLS
- add symlink support
require TLS 1.2 for all TLS connections
2020-08-15 13:02:25 +02:00
Nicola Murino
fe857dcb1b
CI: use go 1.15 by default now that it is released
2020-08-12 16:42:38 +02:00
Nicola Murino
aa0ed5dbd0
add post-login hook
...
a login scope is supported too so you can get notifications for failed logins,
successful logins or both
2020-08-12 16:15:12 +02:00
Nicola Murino
a9e21c282a
add WebDAV support
...
Fixes #147
2020-08-11 23:56:10 +02:00
Antoine Deschênes
9a15a54885
sftpd: set failed connection loglevel to debug ( #152 )
2020-08-06 21:20:31 +02:00
Nicola Murino
91dcc349de
Add client IP address to external auth, pre-login and keyboard interactive hooks
2020-08-04 18:03:28 +02:00
Nicola Murino
fa41bfd06a
Cloud backends: add support for FTP REST command
...
So partial downloads are now supported as for local fs
2020-08-03 18:03:09 +02:00
Nicola Murino
8839c34d53
FTP: implements ClientDriverExtensionRemoveDir
...
Fixes #149 for FTP too
2020-08-03 17:36:43 +02:00
Nicola Murino
11ceaa8850
docker: document how to enable FTP/S
2020-08-01 08:56:15 +02:00
Nicola Murino
2a9f7db1e2
Cloud FS: don't propagate the error if removing a folder returns not found
...
for Cloud FS the folders are virtual and they, generally, disappear when the
last file is removed.
This fix doesn't work for FTP protocol for now.
Fixes #149
2020-07-31 19:24:57 +02:00