| Summary: | editing files deletes them, destroying hardlinks | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] kio-extras | Reporter: | H.H. <cyberbeat> |
| Component: | SFTP | Assignee: | Andreas Schneider <asn> |
| Status: | RESOLVED UPSTREAM | ||
| Severity: | major | CC: | sitter |
| Priority: | NOR | ||
| Version First Reported In: | 18.04.3 | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
H.H.
2010-09-16 09:36:15 UTC
Thank you for taking the time to report this bug and helping to make KDE better. The kio_sftp slaves tries to do an atomic copy to prevent data loss. If you copy a file to the server, it creates a temporary file. All data is written into this file and if it was successful the original file gets overwritten. This means that the hardlink gets overwritten in your case. As the sftp protocol has never been finished there is no way to determine if a file is a hardlink or not. Only symlinks are supported and only with a trick on openssh. how does fish do that? I have seen multiple google-results for "sftp hardlinks", there seem to exist some patches, but I don't know if and where they are integrated. The sftp rename implementation is not a POSIX rename. Maybe a POSIX rename does it correctly. OpenSSH has an sftp extension for a posix-rename. I could implement that and enable it for OpenSSH servers then. That would be great. Here is the bug-report in openssh, and proof that openssh-5.7 supports hardlinks: https://bugzilla.mindrot.org/show_bug.cgi?id=1555 Comment 8: hard link patch is submitted and will be released in OpenSSH 5.7 I've opened https://bugs.libssh.org/T98 Closing as this needs dealing with in libssh upstream. |