ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    PowerShell - FTP Upload Script No Longer Working

    IT Discussion
    powershell ftp script
    5
    31
    2.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 1
      1337 @1337
      last edited by 1337

      It could be that the server is requiring a SSL/TLS connection.

      Then it would connect over normal FTP but switch to encryption before sending username/password. But then all firewall rules and whatnot have to be set right and the client also has to support TLS for it to work.

      Is it a windows server you sending the file to? Then check what ftp server settings it has.

      1 Reply Last reply Reply Quote 0
      • D
        dafyre
        last edited by

        I tried using this on a local FTP server that I control using known usernames and passwords....

        using user.name / MySecretPassword! works fine.

        using user@domain.com / MySecretPassword! does not work at all -- with the ftp command line, nor the .Net.Webclient for me.

        1 Reply Last reply Reply Quote 1
        • W
          wrx7m
          last edited by

          @Pete-S said in PowerShell - FTP Upload Script No Longer Working:

          @wrx7m said in PowerShell - FTP Upload Script No Longer Working:

          @Pete-S it still gives login incorrect

          Then you probably made a mistake somewhere.
          Login works here with a username in the format xxx@domain.com. Win7 client connecting to linux ftp server.
          So it's not the windows ftp client that is the problem.

          The server is running ProFTPD. It is not running encryption, because I had to disable encryption in Filezilla in order to connect.

          1 Reply Last reply Reply Quote 0
          • W
            wrx7m
            last edited by

            This server is managed by our web development consultants, so I told them what I had tried and that I was now out of ideas on how to connect. Suggested maybe they can revert to the old syntax, sans @domain.com for the user name.

            D 1 Reply Last reply Reply Quote 1
            • D
              dafyre @wrx7m
              last edited by

              @wrx7m said in PowerShell - FTP Upload Script No Longer Working:

              This server is managed by our web development consultants, so I told them what I had tried and that I was now out of ideas on how to connect. Suggested maybe they can revert to the old syntax, sans @domain.com for the user name.

              It doesn't just affect ProFTPd... It also affects the FileZilla server as well.

              W 1 Reply Last reply Reply Quote 1
              • W
                wrx7m @dafyre
                last edited by

                @dafyre said in PowerShell - FTP Upload Script No Longer Working:

                @wrx7m said in PowerShell - FTP Upload Script No Longer Working:

                This server is managed by our web development consultants, so I told them what I had tried and that I was now out of ideas on how to connect. Suggested maybe they can revert to the old syntax, sans @domain.com for the user name.

                It doesn't just affect ProFTPd... It also affects the FileZilla server as well.

                Thanks for testing that out for me. I appreciate knowing that I am not crazy.

                1 Reply Last reply Reply Quote 1
                • M
                  manxam
                  last edited by

                  I assumed this was somehow related to how auth basic allows you to formulate your login as :
                  user:pass@server.com
                  Therefore, the @ sign is being misinterpreted when it's being provided in a username.

                  With that in mind I went searching the interwebs and came across THIS confirming my suspicions.

                  Can you try replacing your @ sign with the + sign and let us know if it works? i.e.
                  wrx7m+gmail.com

                  W 1 Reply Last reply Reply Quote 1
                  • 1
                    1337
                    last edited by 1337

                    Where I tried and it works fine was Win7pro built-in ftp client to Pure-FTPd server.

                    The user@domain.com type names are VERY common on cpanel installations. I think it's referred to as long-form username.
                    So basically it's used by millions.

                    W 1 Reply Last reply Reply Quote 0
                    • W
                      wrx7m @1337
                      last edited by

                      @Pete-S Yeah, I am not saying it isn't common. I find it very strange too.

                      1 Reply Last reply Reply Quote 0
                      • W
                        wrx7m @manxam
                        last edited by wrx7m

                        @manxam said in PowerShell - FTP Upload Script No Longer Working:

                        I assumed this was somehow related to how auth basic allows you to formulate your login as :
                        user:pass@server.com
                        Therefore, the @ sign is being misinterpreted when it's being provided in a username.

                        With that in mind I went searching the interwebs and came across THIS confirming my suspicions.

                        Can you try replacing your @ sign with the + sign and let us know if it works? i.e.
                        wrx7m+gmail.com

                        Thanks for the suggestion. However, this doesn't work either. I also tried %40 (instead of @), which is what winscp comes up with in its generator.

                        M 1 Reply Last reply Reply Quote 0
                        • M
                          manxam @wrx7m
                          last edited by

                          @wrx7m : Darn. Sorry 😞

                          1 Reply Last reply Reply Quote 1
                          • W
                            wrx7m
                            last edited by

                            After changing the user syntax back so it does not include @domain.com, it started working again.

                            1 1 Reply Last reply Reply Quote 2
                            • 1
                              1337 @wrx7m
                              last edited by

                              @wrx7m said in PowerShell - FTP Upload Script No Longer Working:

                              After changing the user syntax back so it does not include @domain.com, it started working again.

                              Good that you got it working.

                              I wonder, was the ftp server you wanted to connect to IIS on Windows or was it something else?

                              W 1 Reply Last reply Reply Quote 0
                              • W
                                wrx7m @1337
                                last edited by

                                @Pete-S It was on linux - ProFTPD

                                1 Reply Last reply Reply Quote 0
                                • 1
                                • 2
                                • 2 / 2
                                • First post
                                  Last post