Skip Menu |

This queue is for tickets about the Net-SFTP CPAN distribution.

Report information
The Basics
Id: 13233
Status: resolved
Priority: 0/
Queue: Net-SFTP

People
Owner: Nobody in particular
Requestors: alambert-spam [...] quickfire.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.09
Fixed in: (no value)



Subject: get() has trouble with directories
Hi there, I'm running Net::SFTP 0.09 on perl v5.8.2(i386-freebsd) with FreeBSD 4.10-RELEASE. Before I begin, kudos on a very well-documented module. I especially appreciate the sample client you've included. I've noticed that get() has problems with being asked to download directories: -bash-2.05b$ perl psftp exile Connecting to exile... Remote working directory: /home/alambert Show quoted text
sftp> get /etc
Downloading /etc to etc Show quoted text
sftp> exit
-bash-2.05b$ ls -al etc -rwxr-xr-x 1 alambert alambert 0 Jun 12 20:49 etc I tried the same with OpenSSH's sftp client; it returns an error message: -bash-2.05b$ sftp exile Connecting to exile... Show quoted text
sftp> get /etc
Fetching /etc to etc Cannot download a directory: /etc Show quoted text
sftp> exit
In the latest versions of OpenSSH, it refuses to transfer any non-regular file. The check is trivial; here is the code that the OpenSSH client uses: regular files only: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/sftp-client.c.diff?r1=1.40&r2=1.41&f=h no directories (earlier): http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/sftp-client.c.diff?r1=1.13&r2=1.14&f=h I looked at the Net::SFTP code and get() already does a stat(), which makes the necessary changes even easier. The Fnctl module provides the S_ISREG function that OpenSSH uses. A similar patch may be applied to put(). Thanks again. Alex Lambert alambert at quickfire dot org
I'll accept a patch to the module, otherwise it looks a little tricky seeing as whoever wrote the Net::SFTP::Attributes class left out the type.
Subject: free ringtones<a href='http://www.ringtones-dir.com'
From: http://www.ringtones-dir.com
<a href='http://www.yahoo.com'></a>Thanks! http://www.ringtones-dir.com/download/ <a href='http://www.ringtones-dir.com'>download ringtones</a>. <a href="http://www.ringtones-dir.com ">nokia ringtones</a>: Free nokia ringtones here, Download ringtones FREE, Best free samsung ringtones. Also [url]http://www.ringtones-dir.com/free/[/url] and [link=http://www.ringtones-dir.com]ring tones[/link] From site .
Fix in 0.11: Net::SFTP::get will reject gets on directories. psftp won't give a useful message, though; it'll just ignore the failure.