in reply to Re: fsetstat no such file
in thread fsetstat no such file

Thank you for the reply.
I do not know the software at the remote site. I have looked at cpan site for help and found adding option "copy_perms" should disable the permission problem but when I use this I get
Can't use string ("copy_perms") as a subroutine ref while "strict refs +" in use at /usr/lib/perl5/site_perl/5.8.5/Net/SFTP.pm line 459.
Is there a way to not use strict refs?

Replies are listed 'Best First'.
Re^3: fsetstat no such file
by JavaFan (Canon) on Feb 28, 2012 at 21:21 UTC
    Is there a way to not use strict refs?
    Of course. If you don't want strict refs, then don't use them. Unless you tell Perl to use strict refs, Perl will not enable strict refs!

    Having said that, I doubt that disabling strict refs solves your problem. My guess? You need to put quotes around copy_perms.

Re^3: fsetstat no such file
by salva (Canon) on Feb 28, 2012 at 21:54 UTC
    You have to write it inside quotes (i.e. 'copy_perms'), but in that case, that an argument is also required, you can use the fat arrow: copy_perms => 1.

    In any case, note that the copy_perms feature is exclusive of Net::SFTP::Foreign. Net::SFTP does not support it.

    In order to know the software used, you can just telnet to the SSH port and it will tell you. For instance:

    $ telnet localhost 22 Trying ::1... Connected to localhost.localdomain. Escape character is '^]'. SSH-2.0-OpenSSH_5.9p1 Debian-2ubuntu2
Re^3: fsetstat no such file
by dkellyhsu (Initiate) on Feb 29, 2012 at 16:48 UTC
    I installed Net::SFTP::Foreign - and all now works! Thank you!