Live data from Hacker News

SFTPGo: A Full Featured SFTP Server in Go

github.com

41–50 of 59 posts

Re: SFTPGo: A Full Featured SFTP Server in Go

#42
post #11

Earlier quoted context omitted.

I'd second this, I've longed struggled to come up with a easy-to-deploy sshd/sftp/chroot configuration that permitted easy database-driven configuration w/o extra shell access. You have to fight a lot of defaults to get this just right. Would the OpenSSH upstream accept patches for an unprivileged sshd/sftp-subsystem to make this easier to use their battle tested code?

Proftpd can do sftp-only out of the box.

on the other hand, its SQL backend modules insist on fetching a password and comparing them using their own functionality and there's no way to get to the the user's typed password into a custom query.

That means that there's no way to authenticate users if you use a password encryption scheme not supported by the bundled modules (like bcrypt for example)

Re: SFTPGo: A Full Featured SFTP Server in Go

#44
I've been avoiding starting a project myself which will require SFTP. Passing text files around via SFTP is how a lot of the world works. It's still painful to implement this, and makes the transfer of data slow (polling for new files to process etc). This introduces a big delay in any data feedback cycles. Managing users with system accounts is painful too.

This project looks to alleviate a lot of these problems.

It'd be great to be able to register webhooks so that it could send events to external systems. Ideally I'd like to know when a file is created/deleted etc without having to walk directories on the sftp server on a regular basis.

Re: SFTPGo: A Full Featured SFTP Server in Go

#45

I've been avoiding starting a project myself which will require SFTP. Passing text files around via SFTP is how a lot of the world works. It's still painful to implement this, and makes the transfer of data slow (polling for new files to process etc). This introduces a big delay in any data feedback cycles. Managing users with system accounts is painful too. This project looks to alleviate a lot of these problems. It…

If you use AWS, there's a managed S3 SFTP service. Solves the availability and notification problems.

They way overcharge though. ($300/month)

Re: SFTPGo: A Full Featured SFTP Server in Go

#46

Can this project be used as a library and integrated into an existing program? I am asking, b/c I am currently working on a little document management system for home-use. It looks like the only sane way to integrate with document scanners is (S)FTP upload or Email (SMPT). I have tried to use off-the-shelf FTP servers for this and inotify to get notified of new uploads. The the solutions work OK, but are hard to setu…

You might need to double check your requirements — SFTP is a very different protocol from FTP/FTPS. Using SFTP for something like document scanners without strong Unix roots would be surprising to me, at least.

Re: SFTPGo: A Full Featured SFTP Server in Go

#47
post #15

This looks like a very interesting project to make a lightweight sftp server, though the dependency on an SQL db makes it a bit harder to install. Go has a really good set of crypto primitives, an excellent ssh implementation maintained by the core team, and a great sftp server and client library which makes this project possible. I recently added an sftp server to rclone: https://rclone.org/commands/rclone_serve_sft…

Does it need to be relational? Perhaps boltdb could do it https://github.com/boltdb/bolt

I’ve been looking for something precisely like Bolt, thank you for the link!

Re: SFTPGo: A Full Featured SFTP Server in Go

#48

Earlier quoted context omitted.

If you were planing on using this on a PaaS host where the file system is ephemeral this would be a non-starter.

What would the RL use case be for running this server, whose purpose is to facilitate transferring files from one computer's filesystem to another, on an ephemeral filesystem?

If what's meant here is that it would be hard to run this on a container platform because of the ephemeral nature of containers, assumably you would be using persistent volumes to keep your state safe across the container lifecycle.

That being said if you really wanted to use sqlite for the database, you'd do the exact same thing, use a persistent volume.

Re: SFTPGo: A Full Featured SFTP Server in Go

#49

I've been avoiding starting a project myself which will require SFTP. Passing text files around via SFTP is how a lot of the world works. It's still painful to implement this, and makes the transfer of data slow (polling for new files to process etc). This introduces a big delay in any data feedback cycles. Managing users with system accounts is painful too. This project looks to alleviate a lot of these problems. It…

just drop files with guids into stage dirs and send all staged files over to another stage dir on the other side. When successfullly archive on both ends of the transfer.

Re: SFTPGo: A Full Featured SFTP Server in Go

#50

Earlier quoted context omitted.

I'd second this, I've longed struggled to come up with a easy-to-deploy sshd/sftp/chroot configuration that permitted easy database-driven configuration w/o extra shell access. You have to fight a lot of defaults to get this just right. Would the OpenSSH upstream accept patches for an unprivileged sshd/sftp-subsystem to make this easier to use their battle tested code?

If you just want to share files and not giving the option to upload files, you could try graft... https://github.com/sandreas/graft graft serve ./*.txt will serve every txt file in the current dir...

If you don't mind, I have a question about graft.

> graft will prompt for a password, run an sftp server and promote it via zeroconf.

Is that a one time password that will be used by the "receiver" to download the file?

Post reply on HN