Thank you for the reply and for your the suggestions on the names, the doc does refer to using the umask parameters for controlling permissions, but in researching the umask command I saw the following: - The umask command cannot grant extra permissions beyond what is specified by the program that creates the file or directory. If you need to make permission changes to existing file use the chmod command. - some of the files I am dealing with are replacement files and using umask does not allow it to be changed to 0777(the best I can get to is 0755). I am trying to use the sftp 'chmod' command but not getting good results, I am supplying the 'chmod' command the full path on the linux server, but it is coming back saying the file does not exist, although I think that is a generic error supplied to state it was not successful (Couldn't setstat remote file (chmod): No such file) . The second topic of the file arriving with a 0 length, I did see a post http://www.tek-tips.com/viewthread.cfm?qid=1674115 that if a file is owned by someone other than me but they are in the same group (ie. I can read/write to the file), this will cause the put (rput) command to not be allowed to change the permissions on the file, thus getting the 0 length file. I followed the suggestions on the post (in below command line in the code), but I am still receiving the 0 length. Also changed the Unix.pm file to have a buffer value of 4096 and still getting zero length files.

$sftp->rput($source_ftp_dir, $destination_ftp_dir, copy_perm => 0, cop +y_time => 0) $sftp->chmod($full_path_dest_file, 0777) or die "count not chmod file +\n" . $sftp->error;

In reply to Re^4: rput on foreign sftp in perl by Anonymous Monk
in thread rput on foreign sftp in perl by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.