Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
laziness, impatience, and hubris
 
PerlMonks  

Re: rput on foreign sftp in perl

by salva (Monsignor)
on Sep 18, 2013 at 09:39 UTC ( #1054629=note: print w/ replies, xml ) Need Help??


in reply to rput on foreign sftp in perl

Activate debugging for Net::SFTP::Foreign recursive and error methods (see debug.txt) and post here the output you get:

$Net::SFTP::Foreign::debug = 32768|64;


Comment on Re: rput on foreign sftp in perl
Download Code
Re^2: rput on foreign sftp in perl
by Anonymous Monk on Sep 18, 2013 at 11:14 UTC

    Thanks for your help - here is the output of the debug statement: # rput handling /test/staging/TestMap # rpath: /test/perf/staging/Apps/TestMap # _set_err code: 42, str: Remote directory '/test/perf/staging/Apps/TestMap' already exists # rput handling /test/staging/TestMap/cls # rpath: /test/perf/staging/Apps/TestMap/cls # _set_err code: 42, str: Remote directory '/test/perf/staging/Apps/TestMap/cls' already exists # rput handling /test/staging/TestMap/src # rpath: /test/perf/staging/Apps/TestMap/src # _set_err code: 42, str: Remote directory '/test/perf/staging/Apps/TestMap/src' already exists # rput handling /test/staging/TestMap/cls/com # rpath: /test/perf/staging/Apps/TestMap/cls/com # _set_err code: 42, str: Remote directory '/test/perf/staging/Apps/TestMap/cls/com' already exists # rput handling /test/staging/TestMap/src/com # rpath: /test/perf/staging/Apps/TestMap/src/com # _set_err code: 42, str: Remote directory '/test/perf/staging/Apps/TestMap/src/com' already exists # rput handling /test/staging/TestMap/cls/com/test # rpath: /test/perf/staging/Apps/TestMap/cls/com/test # _set_err code: 42, str: Remote directory '/test/perf/staging/Apps/TestMap/cls/com/test' already exists # rput handling /test/staging/TestMap/src/com/test # rpath: /test/perf/staging/Apps/TestMap/src/com/test # _set_err code: 42, str: Remote directory '/test/perf/staging/Apps/TestMap/src/com/test' already exists # rput handling /test/staging/TestMap/cls/com/test/trigger # rpath: /test/perf/staging/Apps/TestMap/cls/com/test/trigger # _set_err code: 42, str: Remote directory '/test/perf/staging/Apps/TestMap/cls/com/test/trigger' already exists # rput handling /test/staging/TestMap/cls/com/test/trigger/TestMap.class # rput handling /test/staging/TestMap/cls/com/test/data # rpath: /test/perf/staging/Apps/TestMap/cls/com/test/data # _set_err code: 42, str: Remote directory '/test/perf/staging/Apps/TestMap/cls/com/test/data' already exists # rput handling /test/staging/TestMap/cls/com/test/data/testMembersPricingVO.class # rput handling /test/staging/TestMap/cls/com/test/data/testPriceDetailDTO.class # rput handling /test/staging/TestMap/cls/com/test/data/testTriggerVO.class # rput handling /test/staging/TestMap/cls/com/test/data/testPriceHeaderDTO.class # rput handling /test/staging/TestMap/src/com/test/trigger # rpath: /test/perf/staging/Apps/TestMap/src/com/test/trigger # _set_err code: 42, str: Remote directory '/test/perf/staging/Apps/TestMap/src/com/test/trigger' already exists # rput handling /test/staging/TestMap/src/com/test/trigger/TestMap.java # _set_status code: 3, str: Permission denied # _set_err code: 24, str: Couldn't setstat remote file: Permission denied Use of uninitialized value in numeric ne (!=) at /usr/lib/perl5/site_perl/5.8.8/Net/SFTP/Foreign/Common.pm line 79. # rput handling /test/staging/TestMap/src/com/test/data # rpath: /test/perf/staging/Apps/TestMap/src/com/test/data # _set_err code: 42, str: Remote directory '/test/perf/staging/Apps/TestMap/src/com/test/data' already exists # rput handling /test/staging/TestMap/src/com/test/data/testPriceHeaderDTO.java # rput handling /test/staging/TestMap/src/com/test/data/testTriggerVO.java # rput handling /test/staging/TestMap/src/com/test/data/testPriceDetailDTO.java # rput handling /test/staging/TestMap/src/com/test/data/testMembersPricingVO.java

      Could you wrap the output with <code></code> tags in order to make it understandable?

        Thank you so much for your help salva and Kcott!! I got past my problem. The issue was with rput. even though I had put in the options to not change permissions (copy_perm => 0, copy_time => 0) it did not seem to work, rput tried to update the permissions on the file and thus I got the 0 byte file(this occurs if a file exists on the target server, I am in the same group as the person who created the file on the target server and the target file has been set to chmod 777, but rput wants to change permissions and can't, so it leaves it at a 0 length file). So I switched over the put command with the options copy_perm => 0, copy_time => 0 and that did work!!, the permissions were not changed and it allowed the updating of a file. Thanks

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054629]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2014-04-20 04:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls