New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/leffss/sftpd

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/leffss/sftpd

  • v0.0.1
  • Source
  • Go
  • Socket score

Version published
Created
Source

sftpd - SFTP server library in Go

基于 github.com/taruti/sftpd 截止 2020.04.02 的版本, 这个项目功能没有 github.com/pkg/sftp 全且更新慢, 但是可取的地方是使用了 FileSystem 接口来提供对目录的读写操作, 这样子就可以很方便的各种实现文件系统, 包括本地文件系统或者连接后端的 sftp server 的文件系统.

相对于原版做了以下修改:

  • 修正不支持 SSH_FXP_EXTENDED 请求的问题
  • 实现了一个本地可读写的文件系统接口 LocalFs,使用方法见 example/localfs
  • 实现了一个后端为 sftp 的可读写的文件系统接口 sftpFs,使用方法见 example/sftpfs
  • 添加软链接等特殊文件的支持(仅支持 liunx)
  • 添加重命名功能
  • 添加文件时间显示
  • 添加用户、组显示(仅支持 linux)
  • 添加中文兼容

开启 debug 显示

go build -tags debug -a

默认使用 log 输出

功能测试

sftp 客户端: sfx, xftp, winscp

文件系统: LocalFs

通过:

  • 显示列表
  • 下载文件
  • 下载目录
  • 上传文件
  • 上传目录
  • 删除文件
  • 删除目录
  • 重命名文件
  • 重命名目录
  • 修改文件属性
  • 修改目录属性
  • 显示文件时间
  • 显示文件大小
  • 显示软链接等特殊文件(仅支持 linux 服务端)
  • 显示宿主(用户和组)(仅支持 linux 服务端)

不通过:

  • 创建软链接

文件系统: sftpFs

通过:

  • 显示列表
  • 下载文件
  • 下载目录
  • 上传文件
  • 上传目录
  • 删除文件
  • 删除目录
  • 重命名文件
  • 重命名目录
  • 修改文件属性
  • 修改目录属性
  • 显示文件时间
  • 显示文件大小
  • 显示软链接等特殊文件(仅支持 linux 服务端)
  • 显示宿主(用户和组,只支持显示 uid 和 gid)(仅支持 linux 服务端)

不通过:

  • 创建软链接

TODO

  • 创建软链接

FAQs

Package last updated on 10 Apr 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc