6

Our hosting provider does not allow ssh-access (because security), but lets us upload files and manipulate directories via sftp. (The only other choice is through "cpanel").

sftp is good enough to allow creating the symbolic links, but not good enough to properly list them. For example:

sftp> symlink 500 rwu
sftp> ls -l
lrwxrwxrwx    1 foo bar  3 May 22 16:27 rwu

That is, I can see the fact that "rwu" is a symlink, but I can not see to what. At least, not by default. Is there some "hidden" option to the entire sftp-client or its ls-command, that would list symlinks properly -- the way the real ls(1) would?

0

1 Answer 1

6

The OpenSSH SFTP client does not currently support this.

#ifdef notyet
char *
do_readlink(struct sftp_conn *conn, const char *path)
{
    …
}
#endif

This is the only occurrence of SSH_FXP_READLINK in the OpenSSH source code. I don't know why this is commented out or what it would take to make it work. The only relevant message I can find on the OpenSSH mailing list is a patch from 2002 that wasn't adopted.

So your only option is to use a different SFTP client, such as SSHFS or curl.

2
  • FileZilla cannot display link target either. +1 anyway May 23, 2017 at 5:47
  • 1
    Some versions of curl can do sftp too. If you use the url of the directory it will show the typical ls -l output with -> for symbolic links.
    – meuh
    May 23, 2017 at 8:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .