Operating System - HP-UX
1834038 Members
3042 Online
110063 Solutions
New Discussion

Retrieve files via ftp and symbolic links

 
SOLVED
Go to solution
Diego Balgera
Frequent Advisor

Retrieve files via ftp and symbolic links

Hi,

I need to download files from an ftp server (installed over hp-ux 11.x), these files are referenced by symbolic links and I need to use the symbolic links as starting points, as follows:

LinkFile -----> symlink -----> RealFile

Some clients works perfectly: when I execute the command "GET LinkFile", the system follows the link and downloads the RealFile without any problem.
In some other cases, it doesn't work and the client returns an error, but its meaning is not clear to me.

Who can help me in identifying how I can overcome this problem?

Btw, who follows the link? Is it the ftp client that follows the link or viceversa the fact that a file is referenced by a link is transparent to the client (and following the link is handled by Unix)?

Thank you in advance!
Best regards.
Diego.
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: Retrieve files via ftp and symbolic links

This issue may be the ftp client being used. Some clients handle this correctly, others do not.

Could it have to do with the permissions on the file being linked to? Maybe the user doesn't have rights and everything is working just as it should.

This sounds like a situation calling for a little Unix Dectective work.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Geoff Wild
Honored Contributor
Solution

Re: Retrieve files via ftp and symbolic links

The problem is that many browsers do not support sym links in FTP. You MUST use a decent ftp program such as WSftp on the client side with symbolic links...


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Diego Balgera
Frequent Advisor

Re: Retrieve files via ftp and symbolic links

Yes, you are right.

With some clients it works, with some other clients it doesn't.
But I wonder if there is an ftp command to be sent so that a client with the problem could fix its problem.

It is not an issue regarding the permissions. The "real" file has correct permissions for downloading and the symlink is set 777.

Thank you!
Diego.
Mark Greene_1
Honored Contributor

Re: Retrieve files via ftp and symbolic links

What errors are you getting on the client side, and have you checked for error messages on the host side in the syslog?

mark
the future will be a lot like now, only later
Diego Balgera
Frequent Advisor

Re: Retrieve files via ftp and symbolic links

Hi Mark,

1) the ftp client reports the following error:
550 /tmp/testfile: Not a directory
... but filename is a symlink pointing to a regular file, not a directory at all.

2) The syslog doesn't report any error.

Thank you again.
Diego.