[Ssh-sftp-perl-users] Getting SETSTAT failures from sftp-put
Brought to you by:
dbrobins
From: Bob G. <sta...@ga...> - 2010-07-21 12:21:01
|
Dear perl-gods, I have a daemon, written in perl, that SFTP's files to target hosts based upon an INI file of local-directories to watch, and target-hosts. It has been working fine for some time. I am using Perl v5.8.8, Net::SFTP::Foreign v1.51 & ::Compat v1.36 The relevant code is: %LIBARGS=('user'+>$RHUSER,'port'=>$RHPORT,'late_setperm'=>1); $SLC = Net::SFTP::Foreign::Compat->new($RHNAME, %LIBARGS); my $FXSTAT = $SLC->put($SAF, $DAF); A new host to which I must now send things is a relatively new SFTP implementation and has internal processes that move files as soon as received. I suspect this is the reason I am getting an error: "Couldn't setstat remote file (setstat)': Specified file path is invalid" ...even though the file was received by the remote host. This new host also does not permit changing perms on open files so the "late_setperm" argument must be used (as is required on all my other hosts). Given a choice between error 3 "The requested operation cannot be performed because there is a file transfer in progress" or error 2 "Specified file path is invalid", I've opted to put in a workaround (the logic handling $FXSTAT values) to disregard error 2 from this particular host. I'd prefer eliminating the error. I am not talented enough to interpret all that is going on in Net/SFTP/Foreign/Compat.pm but I believe it is setting permissions and such, whether that is needed or not, and this is what is actually failing. I absolutely do NOT want to modify Compat.pm or any other parts of the module, for a variety of reasons. I am hoping there is some option to disable the setting of attributes. Thanks for any help with this. -- RLG, That's me. Si vis pacem, para bellum |