Loading ...
Sorry, an error occurred while loading the content.

Net::FTP::mkdir problem

Expand Messages
  • lakshmi.sailaja@wipro.com
    Hello, I am unable to create directory using $ftp- mkdir. ... use Net::FTP; $ftp = Net::FTP- new( xx.xx.xx.xx ) or die Can t connect: $@ n ;
    Message 1 of 7 , Apr 18, 2005
    • 0 Attachment
      Hello,

      I am unable to create directory using $ftp->mkdir.
      Please have a look at the following code snippet:

      ------------------------------------------------------------------------
      ----

      use Net::FTP;

      $ftp = Net::FTP->new("xx.xx.xx.xx") or die "Can't connect: $@\n";
      $ftp->login($user, $passwd) or die "Couldn't login\n";

      $remotedir = "/home/folder1/folder2";
      $ftp->mkdir($remotedir, 0777) or die "Couldn't create directory: $!\n";

      ------------------------------------------------------------------------
      ----

      This always prints "Couldn't create directory".

      Please let me know if I am wrong.

      Regards,
      Sailaja
    • Mike Southern
      You have to make sure that home exists before you make folder folder1 . Then you have to make sure that folder1 exists before you make folder2 . On
      Message 2 of 7 , Apr 18, 2005
      • 0 Attachment
        You have to make sure that "home" exists before you make folder "folder1".

        Then you have to make sure that "folder1" exists before you make "folder2".



        On 4/18/05 10:16 AM, lakshmi.sailaja@... at lakshmi.sailaja@...
        wrote:

        >
        > Hello,
        >
        > I am unable to create directory using $ftp->mkdir.
        > Please have a look at the following code snippet:
        >
        > ------------------------------------------------------------------------
        > ----
        >
        > use Net::FTP;
        >
        > $ftp = Net::FTP->new("xx.xx.xx.xx") or die "Can't connect: $@\n";
        > $ftp->login($user, $passwd) or die "Couldn't login\n";
        >
        > $remotedir = "/home/folder1/folder2";
        > $ftp->mkdir($remotedir, 0777) or die "Couldn't create directory: $!\n";
        >
        > ------------------------------------------------------------------------
        > ----
        >
        > This always prints "Couldn't create directory".
        >
        > Please let me know if I am wrong.
        >
        > Regards,
        > Sailaja
        >
      • lakshmi.sailaja@wipro.com
        Hello Mike, The code snippet was to create folder2 under /home/folder1 . The path /home/folder1 exists. But I was unable to create the directory. Regards,
        Message 3 of 7 , Apr 18, 2005
        • 0 Attachment
          Hello Mike,

          The code snippet was to create folder2 under "/home/folder1". The path
          "/home/folder1" exists. But I was unable to create the directory.

          Regards,
          Sailaja


          -----Original Message-----
          From: perl-beginner@yahoogroups.com
          [mailto:perl-beginner@yahoogroups.com] On Behalf Of Mike Southern
          Sent: Monday, April 18, 2005 7:55 PM
          To: perl-beginner@yahoogroups.com
          Subject: Re: [PBML] Net::FTP::mkdir problem


          You have to make sure that "home" exists before you make folder
          "folder1".

          Then you have to make sure that "folder1" exists before you make
          "folder2".



          On 4/18/05 10:16 AM, lakshmi.sailaja@... at
          lakshmi.sailaja@...
          wrote:

          >
          > Hello,
          >
          > I am unable to create directory using $ftp->mkdir.
          > Please have a look at the following code snippet:
          >
          >
          ------------------------------------------------------------------------
          > ----
          >
          > use Net::FTP;
          >
          > $ftp = Net::FTP->new("xx.xx.xx.xx") or die "Can't connect: $@\n";
          > $ftp->login($user, $passwd) or die "Couldn't login\n";
          >
          > $remotedir = "/home/folder1/folder2";
          > $ftp->mkdir($remotedir, 0777) or die "Couldn't create directory:
          $!\n";
          >
          >
          ------------------------------------------------------------------------
          > ----
          >
          > This always prints "Couldn't create directory".
          >
          > Please let me know if I am wrong.
          >
          > Regards,
          > Sailaja
          >



          Unsubscribing info is here:
          http://help.yahoo.com/help/us/groups/groups-32.html
          Yahoo! Groups Links
        • Suraj Jacob
          then it should be the permissions of /home/folder1 check that you have write and execute permissions on the folder ... -- Randomness conceives
          Message 4 of 7 , Apr 19, 2005
          • 0 Attachment
            then it should be the permissions of /home/folder1

            check that you have write and execute permissions on the folder

            lakshmi.sailaja@... wrote:

            >
            > Hello Mike,
            >
            > The code snippet was to create folder2 under "/home/folder1". The path
            > "/home/folder1" exists. But I was unable to create the directory.
            >
            > Regards,
            > Sailaja
            >
            >
            > -----Original Message-----
            > From: perl-beginner@yahoogroups.com
            > [mailto:perl-beginner@yahoogroups.com] On Behalf Of Mike Southern
            > Sent: Monday, April 18, 2005 7:55 PM
            > To: perl-beginner@yahoogroups.com
            > Subject: Re: [PBML] Net::FTP::mkdir problem
            >
            >
            > You have to make sure that "home" exists before you make folder
            > "folder1".
            >
            > Then you have to make sure that "folder1" exists before you make
            > "folder2".
            >
            >
            >
            > On 4/18/05 10:16 AM, lakshmi.sailaja@... at
            > lakshmi.sailaja@...
            > wrote:
            >
            > >
            > > Hello,
            > >
            > > I am unable to create directory using $ftp->mkdir.
            > > Please have a look at the following code snippet:
            > >
            > >
            > ------------------------------------------------------------------------
            > > ----
            > >
            > > use Net::FTP;
            > >
            > > $ftp = Net::FTP->new("xx.xx.xx.xx") or die "Can't connect: $@\n";
            > > $ftp->login($user, $passwd) or die "Couldn't login\n";
            > >
            > > $remotedir = "/home/folder1/folder2";
            > > $ftp->mkdir($remotedir, 0777) or die "Couldn't create directory:
            > $!\n";
            > >
            > >
            > ------------------------------------------------------------------------
            > > ----
            > >
            > > This always prints "Couldn't create directory".
            > >
            > > Please let me know if I am wrong.
            > >
            > > Regards,
            > > Sailaja
            > >
            >
            >
            >
            > Unsubscribing info is here:
            > http://help.yahoo.com/help/us/groups/groups-32.html
            > Yahoo! Groups Links
            >
            >
            >
            >
            >
            >
            >
            >
            >
            > Unsubscribing info is here:
            > http://help.yahoo.com/help/us/groups/groups-32.html
            >
            >
            > ------------------------------------------------------------------------
            > Yahoo! Groups Links
            >
            > * To visit your group on the web, go to:
            > http://groups.yahoo.com/group/perl-beginner/
            >
            > * To unsubscribe from this group, send an email to:
            > perl-beginner-unsubscribe@yahoogroups.com
            > <mailto:perl-beginner-unsubscribe@yahoogroups.com?subject=Unsubscribe>
            >
            > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
            > Service <http://docs.yahoo.com/info/terms/>.
            >
            >

            --

            Randomness conceives creativity...Brainstorm yourself!!!

            http://www.rhythm.com/~suraj
          • Rathna N
            I guess, somethings to do with the rights !!! I m able to use ur script and create the dir. do verify the steps manually.. or go thru debugger. Regards,
            Message 5 of 7 , Apr 19, 2005
            • 0 Attachment
              I guess, somethings to do with the rights !!!
              I'm able to use ur script and create the dir.

              do verify the steps manually.. or go thru debugger.

              Regards,
              Rathna.

              On 4/19/05, lakshmi.sailaja@... <lakshmi.sailaja@...> wrote:
              >
              >
              > Hello Mike,
              >
              > The code snippet was to create folder2 under "/home/folder1". The path
              > "/home/folder1" exists. But I was unable to create the directory.
              >
              > Regards,
              > Sailaja
              >
              >
              > -----Original Message-----
              > From: perl-beginner@yahoogroups.com
              > [mailto:perl-beginner@yahoogroups.com] On Behalf Of Mike Southern
              > Sent: Monday, April 18, 2005 7:55 PM
              > To: perl-beginner@yahoogroups.com
              > Subject: Re: [PBML] Net::FTP::mkdir problem
              >
              > You have to make sure that "home" exists before you make folder
              > "folder1".
              >
              > Then you have to make sure that "folder1" exists before you make
              > "folder2".
              >
              > On 4/18/05 10:16 AM, lakshmi.sailaja@... at
              > lakshmi.sailaja@...
              > wrote:
              >
              > >
              > > Hello,
              > >
              > > I am unable to create directory using $ftp->mkdir.
              > > Please have a look at the following code snippet:
              > >
              > >
              > ------------------------------------------------------------------------
              > > ----
              > >
              > > use Net::FTP;
              > >
              > > $ftp = Net::FTP->new("xx.xx.xx.xx") or die "Can't connect: $@\n";
              > > $ftp->login($user, $passwd) or die "Couldn't login\n";
              > >
              > > $remotedir = "/home/folder1/folder2";
              > > $ftp->mkdir($remotedir, 0777) or die "Couldn't create directory:
              > $!\n";
              > >
              > >
              > ------------------------------------------------------------------------
              > > ----
              > >
              > > This always prints "Couldn't create directory".
              > >
              > > Please let me know if I am wrong.
              > >
              > > Regards,
              > > Sailaja
              > >
              >
              > Unsubscribing info is here:
              > http://help.yahoo.com/help/us/groups/groups-32.html
              > Yahoo! Groups Links
              >
              > Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32.html
              > Yahoo! Groups Links
              >
              >
              >
              >
              >


              --
              Regards,
              Rathna.
            • mail meda
              Hi, I guess the problem concerns with permissions. Check whether the directory /home/folder1/folder2 belongs to the user $user whom you are connecting via
              Message 6 of 7 , Apr 20, 2005
              • 0 Attachment
                Hi,

                I guess the problem concerns with permissions.
                Check whether the directory "/home/folder1/folder2" belongs to the user
                $user whom you are connecting via FTP Object.
                If think it will have indifferent users.Try to create manually on the FTP
                site if still you have the same problem.

                Regards,
                Shiva.

                On 4/19/05, Rathna N <rathnasuresh@...> wrote:
                >
                >
                > I guess, somethings to do with the rights !!!
                > I'm able to use ur script and create the dir.
                >
                > do verify the steps manually.. or go thru debugger.
                >
                > Regards,
                > Rathna.
                >
                > On 4/19/05, lakshmi.sailaja@... <lakshmi.sailaja@...> wrote:
                > >
                > >
                > > Hello Mike,
                > >
                > > The code snippet was to create folder2 under "/home/folder1". The path
                > > "/home/folder1" exists. But I was unable to create the directory.
                > >
                > > Regards,
                > > Sailaja
                > >
                > >
                > > -----Original Message-----
                > > From: perl-beginner@yahoogroups.com
                > > [mailto:perl-beginner@yahoogroups.com] On Behalf Of Mike Southern
                > > Sent: Monday, April 18, 2005 7:55 PM
                > > To: perl-beginner@yahoogroups.com
                > > Subject: Re: [PBML] Net::FTP::mkdir problem
                > >
                > > You have to make sure that "home" exists before you make folder
                > > "folder1".
                > >
                > > Then you have to make sure that "folder1" exists before you make
                > > "folder2".
                > >
                > > On 4/18/05 10:16 AM, lakshmi.sailaja@... at
                > > lakshmi.sailaja@...
                > > wrote:
                > >
                > > >
                > > > Hello,
                > > >
                > > > I am unable to create directory using $ftp->mkdir.
                > > > Please have a look at the following code snippet:
                > > >
                > > >
                > > ------------------------------------------------------------------------
                > > > ----
                > > >
                > > > use Net::FTP;
                > > >
                > > > $ftp = Net::FTP->new("xx.xx.xx.xx") or die "Can't connect: $@\n";
                > > > $ftp->login($user, $passwd) or die "Couldn't login\n";
                > > >
                > > > $remotedir = "/home/folder1/folder2";
                > > > $ftp->mkdir($remotedir, 0777) or die "Couldn't create directory:
                > > $!\n";
                > > >
                > > >
                > > ------------------------------------------------------------------------
                > > > ----
                > > >
                > > > This always prints "Couldn't create directory".
                > > >
                > > > Please let me know if I am wrong.
                > > >
                > > > Regards,
                > > > Sailaja
                > > >
                > >
                > > Unsubscribing info is here:
                > > http://help.yahoo.com/help/us/groups/groups-32.html
                > > Yahoo! Groups Links
                > >
                > > Unsubscribing info is here:
                > http://help.yahoo.com/help/us/groups/groups-32.html
                > > Yahoo! Groups Links
                > >
                > >
                > >
                > >
                > >
                >
                > --
                > Regards,
                > Rathna.
                >
                >
                > Unsubscribing info is here:
                > http://help.yahoo.com/help/us/groups/groups-32.html
                > Yahoo! Groups Links
                >
                >
                >
                >
                >


                [Non-text portions of this message have been removed]
              • lakshmi.sailaja@wipro.com
                Hello Shiva, You are right. It is a problem with permissions. I have assigned the global permission to the ftp folder and it is working fine now. Thanks for
                Message 7 of 7 , Apr 21, 2005
                • 0 Attachment
                  Hello Shiva,

                  You are right. It is a problem with permissions.
                  I have assigned the global permission to the ftp folder and it is
                  working fine now.

                  Thanks for the response.

                  Regards,
                  Sailaja


                  -----Original Message-----
                  From: perl-beginner@yahoogroups.com
                  [mailto:perl-beginner@yahoogroups.com] On Behalf Of mail meda
                  Sent: Wednesday, April 20, 2005 12:58 PM
                  To: perl-beginner@yahoogroups.com
                  Subject: Re: [PBML] Net::FTP::mkdir problem


                  Hi,

                  I guess the problem concerns with permissions.
                  Check whether the directory "/home/folder1/folder2" belongs to the user
                  $user whom you are connecting via FTP Object.
                  If think it will have indifferent users.Try to create manually on the
                  FTP
                  site if still you have the same problem.

                  Regards,
                  Shiva.

                  On 4/19/05, Rathna N <rathnasuresh@...> wrote:
                  >
                  >
                  > I guess, somethings to do with the rights !!!
                  > I'm able to use ur script and create the dir.
                  >
                  > do verify the steps manually.. or go thru debugger.
                  >
                  > Regards,
                  > Rathna.
                  >
                  > On 4/19/05, lakshmi.sailaja@... <lakshmi.sailaja@...>
                  wrote:
                  > >
                  > >
                  > > Hello Mike,
                  > >
                  > > The code snippet was to create folder2 under "/home/folder1". The
                  path
                  > > "/home/folder1" exists. But I was unable to create the directory.
                  > >
                  > > Regards,
                  > > Sailaja
                  > >
                  > >
                  > > -----Original Message-----
                  > > From: perl-beginner@yahoogroups.com
                  > > [mailto:perl-beginner@yahoogroups.com] On Behalf Of Mike Southern
                  > > Sent: Monday, April 18, 2005 7:55 PM
                  > > To: perl-beginner@yahoogroups.com
                  > > Subject: Re: [PBML] Net::FTP::mkdir problem
                  > >
                  > > You have to make sure that "home" exists before you make folder
                  > > "folder1".
                  > >
                  > > Then you have to make sure that "folder1" exists before you make
                  > > "folder2".
                  > >
                  > > On 4/18/05 10:16 AM, lakshmi.sailaja@... at
                  > > lakshmi.sailaja@...
                  > > wrote:
                  > >
                  > > >
                  > > > Hello,
                  > > >
                  > > > I am unable to create directory using $ftp->mkdir.
                  > > > Please have a look at the following code snippet:
                  > > >
                  > > >
                  > >
                  ------------------------------------------------------------------------
                  > > > ----
                  > > >
                  > > > use Net::FTP;
                  > > >
                  > > > $ftp = Net::FTP->new("xx.xx.xx.xx") or die "Can't connect: $@\n";
                  > > > $ftp->login($user, $passwd) or die "Couldn't login\n";
                  > > >
                  > > > $remotedir = "/home/folder1/folder2";
                  > > > $ftp->mkdir($remotedir, 0777) or die "Couldn't create directory:
                  > > $!\n";
                  > > >
                  > > >
                  > >
                  ------------------------------------------------------------------------
                  > > > ----
                  > > >
                  > > > This always prints "Couldn't create directory".
                  > > >
                  > > > Please let me know if I am wrong.
                  > > >
                  > > > Regards,
                  > > > Sailaja
                  > > >
                  > >
                  > > Unsubscribing info is here:
                  > > http://help.yahoo.com/help/us/groups/groups-32.html
                  > > Yahoo! Groups Links
                  > >
                  > > Unsubscribing info is here:
                  > http://help.yahoo.com/help/us/groups/groups-32.html
                  > > Yahoo! Groups Links
                  > >
                  > >
                  > >
                  > >
                  > >
                  >
                  > --
                  > Regards,
                  > Rathna.
                  >
                  >
                  > Unsubscribing info is here:
                  > http://help.yahoo.com/help/us/groups/groups-32.html
                  > Yahoo! Groups Links
                  >
                  >
                  >
                  >
                  >


                  [Non-text portions of this message have been removed]



                  Unsubscribing info is here:
                  http://help.yahoo.com/help/us/groups/groups-32.html
                  Yahoo! Groups Links
                Your message has been successfully submitted and would be delivered to recipients shortly.