https://bugs.kde.org/show_bug.cgi?id=497195

            Bug ID: 497195
           Summary: Symlinked files are truncated when accessed through
                    SFTP
    Classification: Frameworks and Libraries
           Product: kio-extras
           Version: 24.08.3
          Platform: Other
                OS: Other
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: SFTP
          Assignee: plasma-b...@kde.org
          Reporter: kishor...@gmail.com
  Target Milestone: ---

SUMMARY
A symlink to a text file (both located in a folder accessed via SFTP) only
shows a truncated version of that text file when accessed through SFTP.

STEPS TO REPRODUCE
1. On a remote computer (which you have ssh access to), make a symlink to a
long text file (size needs to be more than a few bytes; I used a 1.7KB text
file as an example)
2. Open the symlink location in Dolphin on your local computer (In the address
bar, type sftp://USERNAME@SERVER:22/PATH_TO_FILE/ )
3. Open the symlink with Kate
4. Copy the symlink to a local folder using Dolphin

OBSERVED RESULTS
3. Kate only shows the first few characters of the file.
4. The local copy created by Dolphin only contains the first few characters of
the file.

EXPECTED RESULTS
3. Kate should show the entire file
4. Dolphin should copy the entire file

SOFTWARE VERSIONS
kate 24.08.3
kio-extras 24.08.3
libssh 0.11.1
libssh2 1.11.0
openssh 9.9p1
sshfs 3.7.3
Operating System: Arch Linux 
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.1
Kernel Version: 6.12.3-arch1-1 (64-bit)

ADDITIONAL INFORMATION
A. If I do the same on a local filesystem, the entire file is shown when
opening the symlink.
B. Permissions in a case where this bug can be reproduced (I opened link.txt,
which I earlier created using `ln -s`)
```
$ ls -lh
total 4.0K
lrwxrwxrwx 1 ckishore expert   13 Dec  8 15:20 link.txt -> test_file.txt
-rw-r--r-- 1 ckishore expert 1.8K Dec  8 15:20 test_file.txt
```
C. Note that the size of the symlink is 13B; in this case, exactly the first 13
characters of the text file were shown, suggesting that kio_sftp is wrongly
truncating the file based on the symlink size.
D. On the remote computer, using `cat link.txt` gives me the entire text file,
suggesting there is no issue on the remote end.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to