Net-SFTP - Net::SFTP dies when it is unable to change the attributes of a local file

Posted on Thu Apr 24 01:40:25 2008 by setarcos
Net::SFTP dies when it is unable to change the attributes of a local file
I noticed that Net::SFTP dies if it is unable to set the attributes on a file after it has been transferred from a remote host. This is a problem if you have a file system that doesn't honor *NIX type permissions (ala a Samba mounted Windows share). The following lines in SFTP.pm appear to be to blame:
chmod $mode, $local or croak "Can't chmod $local: $!"; utime $a->atime, $a->mtime, $local or croak "Can't utime $local: $!";
Perhaps failures on can be a little less severe?
Write a response