title: FTP upload with full permission (CHMOD 777)
body: <p>I want to create a directory and upload file in a remote server through PERL FTP function. Everything works fine except I can't upload them with CHMOD 777. Is it something that I can change by command, or it will be determined by the user access level?</p>
  
  <pre><code>#!/usr/bin/perl -w
  use Net::FTP;
  my $ftp=Net::FTP-&gt;new($server);
  $ftp-&gt;login($user, $password);
  $ftp-&gt;binary();
  $ftp-&gt;mkdir($outputdir);
  $chmod     = "chmod 777 $outputdir";
  $ftp-&gt;cmd($chmod);
  $ftp-&gt;cwd($outputdir);
  $ftp-&gt;put($file);
  my $chmod     = "chmod 777 $file";
  $ftp-&gt;cmd($chmod);
  $ftp-&gt;quit;
  </code></pre>