Live data from Hacker News

SFTPGo: A Full Featured SFTP Server in Go

github.com

51–59 of 59 posts

Re: SFTPGo: A Full Featured SFTP Server in Go

#51

Earlier quoted context omitted.

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!

Then you might also want to check out BadgerDB. I can't say which is better, but I know that both are popular and in production use, so probably each with their pros and cons (e.g. read vs. write speed).

Re: SFTPGo: A Full Featured SFTP Server in Go

#52

Earlier quoted context omitted.

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?

No, it is a static unchangeable password. Graft can't "manage" user accounts, it just has one user with password. It does not support keyfiles or other authentication mechanisms.

I wrote graft to have a simple portable tool for transfering files in a network without shares - the main idea behind it was to run:

graft serve myfiles/*.txt

on the server side and then

graft receive

on the client side without having to remember the ip or hostname - because zeroconf / mdns is used, it will find the server automatically, if the network is not too big. If there is more than one server, it will prompt you to choose the right one.

I only used SFTP, because it is a secure way to transfer files over the network.

Re: SFTPGo: A Full Featured SFTP Server in Go

#53

Earlier quoted context omitted.

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...

For that use case, I just use `python3 -m http.server` (or the Python 2 equivalent), especially since Python is almost always already installed.

Cool... is SSL support for secure file transfer?

Re: SFTPGo: A Full Featured SFTP Server in Go

#54

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…

Yes, if you can avoid polling by getting events it can be a good system. But really you want to be notified when a file is closed successfully, not closed after a timeout of other error.

For me, in a previous system I uploaded as a .tmp file, then the uploaded renames to .zip at the end of the upload. The rename is atomic so no chance of the consumer reading a partial file.

I was dealing in CSV, TSV and XML files. I chose to upload them all in a zip wrapper not only because they compress well, but also because each file has a CRC and the file won’t be extracted if the file is damaged or truncated. It’s hard to tell if a raw CSV file has been truncated.

Re: SFTPGo: A Full Featured SFTP Server in Go

#56

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?

I wrote an interface that would allow SFTP transfer to Azure Blob Storage (doesn't support it) that doesn't store anything on the machine running the service. It was really just supposed to be a frontend.

Re: SFTPGo: A Full Featured SFTP Server in Go

#58

Earlier quoted context omitted.

What would your preferred config file formats be, and why?

Any format which enables inline comments, so INI, YAML

SFTPGo switched to viper for configuration so it now supports JSON, YAML, TOML, env vars ecc..

The configuration format it's a your choice

Re: SFTPGo: A Full Featured SFTP Server in Go

#59

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…

Events are now supported, you can configure custom system commands and/or HTTP notifications on SFTP upload, download, delete or rename
Post reply on HN