Topic "symbolic links and winscp?"

Author Message
MickeM

Guest


Hi,

I have been trying to use symbolic links with winscp and cant really make it work like I want.

1, I would like to be able to "not follow" symbolic likns ie:

If I have the following link: /home/mickem/my-link -> /foobar
I would like that to be showed as: /home/mickem/my-link/<files> as opposed to how winscp does it (followes the link) soI get /foobar/<files> when I "enter the link".
The reason for this is that I have alot of symbolic links and want the "up" button to go back to /home/mickem and not /. (This can partally be solved using the back button instead but still it would be simpler if there was an option of not following symbolic links.

2, Downloading a symbolic link to a directory.
When I try to download a symbolic link that points to a directory nothing happends at all. And since winscp knows it is a link to a directory (I have that option enabled and it shows up as a "folder") i think it is strange that it fails (without an error or anything) to download so this I hope is a bug that someone can fix.


// MickeM
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
MickeM wrote:
1, I would like to be able to "not follow" symbolic likns ie:

If I have the following link: /home/mickem/my-link -> /foobar
I would like that to be showed as: /home/mickem/my-link/<files> as opposed to how winscp does it (followes the link) soI get /foobar/<files> when I "enter the link".

That's how SFTP works. Or rather that's how it is implemented in OpenSSH SFTP server (and maybe others).

Quote:
2, Downloading a symbolic link to a directory.
When I try to download a symbolic link that points to a directory nothing happends at all. And since winscp knows it is a link to a directory (I have that option enabled and it shows up as a "folder") i think it is strange that it fails (without an error or anything) to download so this I hope is a bug that someone can fix.

Well, that's a limitation. I'll consider solving it.
_________________
Martin Prikryl
Guest




prikryl wrote:
MickeM wrote:
1, I would like to be able to "not follow" symbolic likns ie:

If I have the following link: /home/mickem/my-link -> /foobar
I would like that to be showed as: /home/mickem/my-link/<files> as opposed to how winscp does it (followes the link) soI get /foobar/<files> when I "enter the link".

That's how SFTP works. Or rather that's how it is implemented in OpenSSH SFTP server (and maybe others).


Well, I know thats how it works in "sftp" but iwould be simple to have an option for winscp to override this behaiviour ie. to have a "virtual path" that is shows to the user and a "real path" it uses on the server. (many regular FTP clients has an option for this)

What I mean is to "hide" the real path in the winscp UI and instead show the symbolic link as a folder.

// Michael Medin
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
These issues have been added to tracker (#51 and #81).
_________________
Martin Prikryl
vasya_pupkin
[View user's profile]

Joined: 2010-05-12
Posts: 1
Location: spb, ru
MickeM wrote:
2, Downloading a symbolic link to a directory.
When I try to download a symbolic link that points to a directory nothing happends at all. And since winscp knows it is a link to a directory (I have that option enabled and it shows up as a "folder") i think it is strange that it fails (without an error or anything) to download so this I hope is a bug that someone can fix.

I came here to report this bug as well. Realy strange that WinSCP fails to copy contents of target directory after resolving symbolic link. At least a warning would be nice, because when it silently fails, I can easily miss something in my backup.

I'm using WinSCP as FAR plugin, latest version.
kevinf

Guest


Any updates on http://winscp.net/tracker/show_bug.cgi?id=51 ?

I have a server which downloads files, it would be awesome if I could create symbolic links to files + folders in a special "completed downloads" directory (which is synced to a windows box), while not physically moving files.

What will happen if get -delete is called, will it delete the symbolic links, the linked to files+folders, or both?
relipse

Guest


WInSCP won't refresh symlinks unless you go to the parent folder, close it, right click -> refresh, then open it again.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
relipse wrote:
WInSCP won't refresh symlinks unless you go to the parent folder, close it, right click -> refresh, then open it again.

You can also disable caching.
http://winscp.net/eng/docs/ui_login_directories
Silverware

Guest


This is a very useful feature for me, I have a usecase where I want multiple users to sync down files from the same location on the server using symlinks.

Can we also get this option added to the command line, instead of purely in site configuration?
Having a simple flag you can set would resolve my current issue, where the users are unprepared to create a site, and I cannot create the site on their system remotely.

TL;DR: A flag for the OPEN command -FollowSymbolicLinks
Silverware

Guest


Silverware wrote:
This is a very useful feature for me, I have a usecase where I want multiple users to sync down files from the same location on the server using symlinks.

Can we also get this option added to the command line, instead of purely in site configuration?
Having a simple flag you can set would resolve my current issue, where the users are unprepared to create a site, and I cannot create the site on their system remotely.

TL;DR: A flag for the OPEN command -FollowSymbolicLinks


Oops ignore this..
-rawsettings FollowDirectorySymlinks=1
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Silverware wrote:
Oops ignore this..
-rawsettings FollowDirectorySymlinks=1

That's correct.
Documented here:
https://winscp.net/eng/docs/rawsettings
kevinf
[View user's profile]
Donor
Joined: 2013-03-27
Posts: 1
Location: canada
Thank you very much for implementing this feature :) I have been following for 3 years. I just donated a few $$. Enjoy.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Thanks for your donation!
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License