SFTP symlink resolution
Posted: 2019-09-28 14:02
Hello,
First of all, I would like to thank developers for the great application.
I have been experiencing the following behavior using SFTP connections: symlinks are always treated like folders, even when they point to files.
on my server I did the following test:
$ mkdir folder
$ touch file
$ ln -sf file link_to_file
$ ln -sf folder link_to_folder
$ ls -lrt
total 0
drwxr-xr-x 1 thomas thomas 4096 Sep 28 15:58 folder
-rw-r--r-- 1 thomas thomas 0 Sep 28 15:58 file
lrwxrwxrwx 1 thomas thomas 4 Sep 28 15:58 link_to_file -> file
lrwxrwxrwx 1 thomas thomas 6 Sep 28 15:58 link_to_folder -> folder
Then I connect to that folder with Filezilla and list:
Listing: drwxr-xr-x 1 thomas thomas 4096 Sep 28 15:58 .
Listing: drwxr-xr-x 1 thomas thomas 4096 Sep 28 15:57 ..
Listing: -rw-r--r-- 1 thomas thomas 0 Sep 28 15:58 file
Listing: drwxr-xr-x 1 thomas thomas 4096 Sep 28 15:58 folder
Listing: lrwxrwxrwx 1 thomas thomas 4 Sep 28 15:58 link_to_file
Listing: lrwxrwxrwx 1 thomas thomas 6 Sep 28 15:58 link_to_folder
The server seems to provide a consistent output to the client.
However, Filezilla will display both links as "folder with an arrow".
The symlink "link_to_folder" behaves fine, it is followed fine and points toward folder
The problem occurs with link_to_file, which is handled as a folder.
Status: Retrieving directory listing of "/home/thomas/test/link_to_file"...
Command: cd "/home/thomas/test/link_to_file"
Error: Directory /home/thomas/test/file: no such file or directory
Error: Failed to retrieve directory listing
The symlink to file shall be resolved as such and treated like a file, no ?
thanks
First of all, I would like to thank developers for the great application.
I have been experiencing the following behavior using SFTP connections: symlinks are always treated like folders, even when they point to files.
on my server I did the following test:
$ mkdir folder
$ touch file
$ ln -sf file link_to_file
$ ln -sf folder link_to_folder
$ ls -lrt
total 0
drwxr-xr-x 1 thomas thomas 4096 Sep 28 15:58 folder
-rw-r--r-- 1 thomas thomas 0 Sep 28 15:58 file
lrwxrwxrwx 1 thomas thomas 4 Sep 28 15:58 link_to_file -> file
lrwxrwxrwx 1 thomas thomas 6 Sep 28 15:58 link_to_folder -> folder
Then I connect to that folder with Filezilla and list:
Listing: drwxr-xr-x 1 thomas thomas 4096 Sep 28 15:58 .
Listing: drwxr-xr-x 1 thomas thomas 4096 Sep 28 15:57 ..
Listing: -rw-r--r-- 1 thomas thomas 0 Sep 28 15:58 file
Listing: drwxr-xr-x 1 thomas thomas 4096 Sep 28 15:58 folder
Listing: lrwxrwxrwx 1 thomas thomas 4 Sep 28 15:58 link_to_file
Listing: lrwxrwxrwx 1 thomas thomas 6 Sep 28 15:58 link_to_folder
The server seems to provide a consistent output to the client.
However, Filezilla will display both links as "folder with an arrow".
The symlink "link_to_folder" behaves fine, it is followed fine and points toward folder
The problem occurs with link_to_file, which is handled as a folder.
Status: Retrieving directory listing of "/home/thomas/test/link_to_file"...
Command: cd "/home/thomas/test/link_to_file"
Error: Directory /home/thomas/test/file: no such file or directory
Error: Failed to retrieve directory listing
The symlink to file shall be resolved as such and treated like a file, no ?
thanks