PowerShell / PowerShell/Win32-OpenSSH
sftp-server: treat junctions as directory symlinks?
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 8.3k
- Forks
- 819
- PR merge metrics
- No merged PRs in 30d
Description
Hi folks.
Please answer the following
"OpenSSH for Windows" version
((Get-Item (Get-Command sshd).Source).VersionInfo.FileVersion)
7.7.2.2
Server OperatingSystem
((Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion\" -Name ProductName).ProductName)
Windows 10 Home
Client OperatingSystem
Linux Mint 19.2 with sshfs 2.8 and FUSE 2.9.7
What is failing
Backups (or simple traversals using /usr/bin/find) try to recurse without termination condition when traversing an sshfs mount of a Windows 10 system, if the directory hierarchy contains a junction.
Expected output
A complete backup, or successful /usr/bin/find.
Actual output
find: '/mymount/windows-10/C:/Documents and Settings/Dan Stromberg/AppData/Local/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Microsoft/Windows Sidebar': Bad message
find: '/mymount/windows-10/C:/Documents and Settings/Dan Stromberg/AppData/Local/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Microsoft/WindowsApps': Bad message
Inhaled 10000 filenames for progress report - can use --progress-report minimal to disable inhalation
find: '/mymount/windows-10/C:/Documents and Settings/Default User/AppData/Local/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Microsoft/Windows Sidebar': Bad message
It seems like a fix would be to treat junctions as directory symlinks in Windows' sftp-server, instead of treating junctions as just another directory.
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the Windows sftp-server handling of directory junctions and reproduce the issue through an sshfs mount with find or a backup traversal. Done means junctions no longer cause recursive paths such as repeated Application Data entries, and complete traversal succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100