Go to file
John Eikenberry c33862bb7d remove special handling of Fstat/Fsetstat
Recent refactoring has eliminated the need for Fstat and Fsetstat (stat
operations on file handle instead of path)to be special cased. They will
now just work with the normal case for any packet with a file handle.
2018-01-07 16:04:33 -08:00
examples Fix #182; use ssh connection meta-data in example 2017-06-29 14:49:54 -07:00
server_standalone server_standalone: handle readonly properly 2017-03-15 12:45:09 -07:00
.gitignore ignore test keys in all examples 2017-06-29 14:48:40 -07:00
.travis.yml update travis go versions 2017-12-12 11:47:49 -08:00
CONTRIBUTORS Adding myself as I'm helping out 2017-01-06 17:20:11 -08:00
LICENSE Rename LICENCE to LICENSE 2014-10-27 21:31:41 +00:00
README.md soften contrib text a bit 2017-04-25 15:30:31 -07:00
attrs.go *: golint: add and fix up comments on exported types 2016-01-07 15:16:34 -05:00
attrs_stubs.go add windows as a build target to _stubs.go files 2015-09-19 19:16:50 -07:00
attrs_test.go *: golint (part 1) 2016-01-07 12:10:24 -05:00
attrs_unix.go *: golint (part 1) 2016-01-07 12:10:24 -05:00
client.go Merge pull request #1 from pkg/master 2017-12-20 15:29:39 +01:00
client_integration_darwin_test.go Do not check bavail, it can change in a shared CI environment 2016-06-15 20:02:28 +10:00
client_integration_linux_test.go vet: formatting directive in Fatal call 2016-09-22 16:33:00 -07:00
client_integration_test.go Add PosixRename method which uses the posix-rename@openssh.com extension 2017-09-05 04:46:03 -07:00
client_test.go Make SSH_FXP_STATUS "message" field optional. 2017-02-05 14:53:51 -08:00
conn.go Fix race between client's close and write 2017-04-08 20:29:37 -07:00
debug.go added debug option, build/test with -tags debug to activate 2014-09-28 12:32:34 +10:00
example_test.go Fixes to mkdir example 2017-08-18 11:04:12 +10:00
match.go Fixes #188; eliminates duplicated core code 2017-07-20 15:28:11 -07:00
other_test.go Handle osx returning EPERM not ENOTDIR 2015-12-22 13:34:21 +09:00
packet-manager.go packageManager to use pointer receivers everywhere 2017-08-20 15:23:55 -07:00
packet-manager_go1.8.go packet-manager: sort incoming request ID queue 2017-04-05 14:15:57 -07:00
packet-manager_legacy.go packet-manager: sort incoming request ID queue 2017-04-05 14:15:57 -07:00
packet-manager_test.go nicer debugging output for a few packet types 2017-07-19 19:25:49 -07:00
packet-typing.go gofmt-ing 2018-01-05 22:53:15 -08:00
packet.go Add PosixRename method which uses the posix-rename@openssh.com extension 2017-09-05 04:46:03 -07:00
packet_test.go packet, server: use a single read-only check 2016-01-11 11:50:10 -05:00
release.go added debug option, build/test with -tags debug to activate 2014-09-28 12:32:34 +10:00
request-example.go Revert server side support for rename@openssh.com extension 2017-12-20 15:22:30 +01:00
request-interfaces.go minor fix to doc comment 2017-08-20 17:47:32 -07:00
request-readme.md update Request structure docs for path and flag changes 2018-01-04 13:30:43 -08:00
request-server.go remove special handling of Fstat/Fsetstat 2018-01-07 16:04:33 -08:00
request-server_test.go tests should just fail, not panic 2018-01-06 19:47:44 -08:00
request-unix.go Revert "rename files with OS specific request test code" 2017-03-01 20:54:40 -08:00
request.go factor out unnecessary data structure 2018-01-06 16:12:05 -08:00
request_test.go simpify Request struct and Method updating 2017-12-23 16:34:22 -08:00
request_windows.go Revert "rename files with OS specific request test code" 2017-03-01 20:54:40 -08:00
server.go packageManager to use pointer receivers everywhere 2017-08-20 15:23:55 -07:00
server_integration_test.go remove ssh-agent requirement for integration tests 2017-08-23 14:46:20 -07:00
server_statvfs_darwin.go add serverside StatVFS function, implemented for darwin and linux (#89) 2016-06-13 14:45:13 +10:00
server_statvfs_impl.go Fix build directive to properly compile under gccgo in Linux (#126) 2016-07-22 09:14:53 +10:00
server_statvfs_linux.go Remove reference to X__val (#142) 2016-10-01 08:07:58 +10:00
server_statvfs_stubs.go Skip statvfs impl on linux if using gccgo (#122) 2016-06-22 13:17:59 +10:00
server_stubs.go Changed default user and group to root and count links for directories to 0 on non *nix systems 2017-08-10 12:10:05 +02:00
server_test.go Resolved conflict with SftpServerWorkerCount 2017-08-13 14:00:08 +02:00
server_unix.go Moved permission detection for runLs to server.go 2017-08-10 07:34:48 +02:00
sftp.go use ietf link for sftp spec everywhere 2017-10-01 17:55:39 -07:00

README.md

sftp

The sftp package provides support for file system operations on remote ssh servers using the SFTP subsystem. It also implements an SFTP server for serving files from the filesystem.

UNIX Build Status GoDoc

usage and examples

See godoc.org/github.com/pkg/sftp for examples and usage.

The basic operation of the package mirrors the facilities of the os package.

The Walker interface for directory traversal is heavily inspired by Keith Rarick's fs package.

roadmap

  • There is way too much duplication in the Client methods. If there was an unmarshal(interface{}) method this would reduce a heap of the duplication.

contributing

We welcome pull requests, bug fixes and issue reports.

Before proposing a large change, first please discuss your change by raising an issue.

For API/code bugs, please include a small, self contained code example to reproduce the issue. For pull requests, remember test coverage.

We try to handle issues and pull requests with a 0 open philosophy. That means we will try to address the submission as soon as possible and will work toward a resolution. If progress can no longer be made (eg. unreproducible bug) or stops (eg. unresponsive submitter), we will close the bug.

Thanks.