in reply to Net::FTP::Recursive Permission and Ownership...

What platform are you using this on? I am going to assume Linux? As far as the permissions go these settings are probably the default settings for new files and directories for the systems themselves. You can change the default settings to match what you want each new file and directory to reflect or simply change the permissions upon upload completion.

Ex: Untested!

#!/usr/bin/perl -w use strict; use Net::FTP; my $ftp_login = "login"; my $ftp_pass = "password"; my $file = "/full/file/path/to/code.tar"; my $chmod = "chmod 777 $file"; my $chown = "chown user $file"; my @list = qw[server1 server2 server3 server4 server5]; for (@list) { if (my $ftp = Net::FTP->new($_)) { print "FTP object is: $ftp\n"; print "\nFTP session for $_ is active!\n"; print "Logging in ..."; if ($ftp->login($ftp_login,$ftp_pass)) { print "Done!\n\n"; $ftp->binary(); $ftp->put($file); $ftp->cmd($chmod); $ftp->cmd($chown); print "Upload complete and permissions set!\n"; }else{ print "\nCould not log in!\n"; $ftp->quit(); } }else{ print "A connection to $_ was not made!\n"; } }
www.perlskripts.com