[v12] SFTP fixes#24831
Merged
capnspacehook merged 6 commits intobranch/v12from Apr 19, 2023
Merged
Conversation
This change also greatly reduces the number of SFTP audit logs. Now SFTP events are only sent when files are opened or modified in any way, instead of for *every* SFTP request. * added to SFTP integration test * fix error when handling setstat on dirs * fix linter warning * move file/dir permission constants to lib/defaults package
Also fix copying symlinked files.
The sftp package is where modern file transfer logic lives and is being maintained. Make the web UI use this package to unify how we transfer files.
cd1aaf8 to
278c507
Compare
zmb3
approved these changes
Apr 19, 2023
r0mant
approved these changes
Apr 19, 2023
Contributor
|
@capnspacehook Looks like this PR is missing |
Contributor
Author
|
I actually did tidy it, but I think when I did I forgot to update the |
Previously a Teleport client using SFTP would resolve remote host user home directories by making a subsystem request to a Teleport server which would return the home directory. The problem was the subsystem request counted as an open session, which could make the SFTP file transfer fail. This was frustrating and didn't make much sense, but after reading the SFTP specification again I realized that SFTP servers are to handle relative paths by assuming they start at the user's home directory. So let the server figure out the correct path and remove any tilde prefixes from remote paths.
278c507 to
0a37aba
Compare
Contributor
Author
|
Interesting, whenever I run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports of: