To make WebMatrix better, I suggest you ...

FTP bug in active ftp

When publishing via FTP webmatrix 2 is trying to create every directory and errors out if directory already exists, insted of just uploading into it ... this means that subdirectories can never be uploaded via webmatrix.

ex: main directory: mydomain - webmatrix creates it and uploads file ok as long as it didnt exist before

but when it goes to upload a sub dir: mydomain/images/ it errors out saying

Error creating directory "/mydomain". /mydomain: File exists (550).

also its kind of a memory hog according to sysinternals tools :)

18 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    GregGreg shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    18 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Mark JedrzejczykMark Jedrzejczyk commented  ·   ·  Flag as inappropriate

        For what it's worth, I'm running into the same problem. I can upload INDIVIDUAL files, but when *publish*, I receive the following error.

        3:05:34 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        3:05:34 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        3:05:35 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        3:05:36 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        3:05:37 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        3:05:37 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        3:05:38 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        3:05:38 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        3:05:39 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        3:05:39 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        3:05:40 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        3:05:40 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        3:05:41 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        3:05:42 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        3:05:42 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        3:05:43 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        3:05:43 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        3:05:44 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        3:05:44 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).
        ERROR: Some files failed to transfer.
        3:05:45 PM: Error creating directory "/httpdocs". /httpdocs: File exists (550).

      • Yishai Galatzer [WebMatrix developer]Yishai Galatzer [WebMatrix developer] commented  ·   ·  Flag as inappropriate

        Hey Again,

        We finally managed to get this problem reproduced. So I can keep digging on my own. What I can see is the server refuses to answer (or more like it says it doesn't) if a full path to a file or folder exists, and that confuses our code.

        I'm looking at a fix but in the mean time, Could you look at permission for directory traversal, I think that by default accessing an absolute path is denied on this server.

      • Yishai Galatzer [WebMatrix developer]Yishai Galatzer [WebMatrix developer] commented  ·   ·  Flag as inappropriate

        Greg,

        I didn't get any email from you with access to the ftp site. I tried several different things on my side, and didn't manage to reproduce your error. I'll give it another shot tomorrow, but I'd really appreciate your help.

      • Yishai Galatzer [WebMatrix developer]Yishai Galatzer [WebMatrix developer] commented  ·   ·  Flag as inappropriate

        I see the double connection on my side as well, that doesn't seem to be the issue.

        Can you share credentials to this ftp server so I can try from my side? My email is y i g a l a t z @microsoft.com

      • GregGreg commented  ·   ·  Flag as inappropriate

        And this is what iget for an error if the directory is already on the server:

        10/2/2012 1:04 AM
        1:04:17 AM: Starting publishing using FTP
        1:04:17 AM: Connecting to "ec2-54-243-****-****.compute-1.amazonaws.com" FTP site. .
        1:04:17 AM: Successfully connected to site: "ec2-54-243-****-****.compute-1.amazonaws.com".
        1:04:20 AM: Connecting to "ec2-54-243-****-***.compute-1.amazonaws.com" FTP site. .
        1:04:20 AM: Successfully connected to site: "ec2-54-243-***-****.compute-1.amazonaws.com".
        1:04:20 AM: Error creating directory "/sample". /sample: File exists (550).
        1:04:20 AM: Error creating directory "/sample". /sample: File exists (550).
        1:04:20 AM: Error creating directory "/sample". /sample: File exists (550).
        1:04:20 AM: Error creating directory "/sample". /sample: File exists (550).
        1:04:20 AM: Error creating directory "/sample". /sample: File exists (550).
        ERROR: Error creating directory "/sample". /sample: File exists (550).
        1:04:21 AM: 221 Goodbye.

      • GregGreg commented  ·   ·  Flag as inappropriate

        nope :) lol i sure didnt hit the button twice ...and i tried this many many times now so i dont think i am hitting the button twice every time

      • GregGreg commented  ·   ·  Flag as inappropriate

        DB file is mysql export via Phmyadmin in text format to be exact.

      • GregGreg commented  ·   ·  Flag as inappropriate

        Also i just noticed that in the log i posted, webmatrix connects to the server twice ??

      • GregGreg commented  ·   ·  Flag as inappropriate

        The DB file is a SQL export i have it saved in a php function for importing ..but i i tried loading it as a .sql file and also tried copying and pasting it into a new file in webmatrix ..same memory use for the most part.

        For the ftp issue:

        About dialog:
        Version 2.0

        WebMatrix: 7.1.1674.0
        IIS Express: 7.1.1190.0
        .NET Framework: 4.0.30319.269 (RTMGDR.030319-2600)
        Web Deploy: 7.1.1631.0
        SQL Server Compact: 4.0.8854.1
        Web Platform Installer: 7.1.1622.0
        ASP.NET Web Pages: 2.0.20715.0
        ----------------------------------------------

        -
        Publish log: (Note that /sample directory does not exist at the start of publish, if it does i get an error right away):

        10/2/2012 12:45 AM
        12:45:02 AM: Starting publishing using FTP
        12:45:02 AM: Connecting to "ec2-54-***-***-125.compute-1.amazonaws.com" FTP site. .
        12:45:02 AM: Successfully connected to site: "ec2-54-***-***-125.compute-1.amazonaws.com".
        12:45:08 AM: Connecting to "ec2-54-***-***-125.compute-1.amazonaws.com" FTP site. .
        12:45:09 AM: Successfully connected to site: "ec2-54-***-***-125.compute-1.amazonaws.com".
        12:45:09 AM: Error creating directory "/sample". /sample: File exists (550).
        12:45:09 AM: Error creating directory "/sample". /sample: File exists (550).
        12:45:09 AM: Transferring: show.php (891 bytes)
        12:45:09 AM: Transferred: show.php
        12:45:09 AM: Transferring: tagcloud.html (4680 bytes)
        12:45:09 AM: Transferred: tagcloud.html
        12:45:09 AM: Transferring: tagcloud.php (34 bytes)
        12:45:09 AM: Transferred: tagcloud.php
        12:45:10 AM: Error creating directory "/sample". /sample: File exists (550).
        12:45:10 AM: Transferring: top-en-words.txt (20384 bytes)
        12:45:10 AM: Transferred: top-en-words.txt
        12:45:10 AM: Transferring: web.config (447 bytes)
        12:45:10 AM: Transferred: web.config
        ERROR: Error creating directory "/sample". /sample: File exists (550).
        12:45:10 AM: Error creating directory "/sample". /sample: File exists (550).
        12:45:10 AM: Error creating directory "/sample". /sample: File exists (550).
        12:45:10 AM: Error creating directory "/sample". /sample: File exists (550).
        12:45:10 AM: Error creating directory "/sample". /sample: File exists (550).
        12:45:10 AM: 221 Goodbye.

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

        My local path is C:\Users\DailyAcc\Documents\My Web Sites\newSite.org

        The server is Proftpd, on Ubuntu Linux 12.04.1

      • Yishai Galatzer [WebMatrix developer]Yishai Galatzer [WebMatrix developer] commented  ·   ·  Flag as inappropriate

        Hey Greg,

        Can you tell us what the file format your DB file is?

        Also regarding FTP, I played a bit with the code today, and didn't quite get the issue you are describing, since that probably means I'm just not doing exactly what you are doing I'd appreciate the following infos:

        1. Can you post the data from the about dialog?
        2. Can you share your publishing log file and your local tree structure?
        3. What kind of ftp server are you using and on what OS?

        Thanks,
        Yishai

      • GregGreg commented  ·   ·  Flag as inappropriate

        The memory issue is not a biggie i was exhilarating a bit, my initial Pryvate bytes and Working set are around 140 - 170 MB, but when i open my huge DB file with 300000 line :) the memory usage goes up to about 1GB, however having that same file open in Notepad++ ..only eats about 150Mb of Working set for Notepad++... but hey its a big file and i expect some memory issues with it especially for a beta application.

        Anyway the more important issue is the FTP bug, since that's preventing me from uploading my site via webmatrix.

        Lets see.

        Nothing special about that directory .. as far as i can tell, I've set the user permission to allow the ftp user to write and read and list files.

        Actually its not just one directory its any directory that exists already thats causing the error it seems.

        For example if i delete all file from the root of the FTP folder, I have a project with subfolders loaded in webmatrix then i run->Publish via webmatrix,

        then go to see the contents of the root ftp folder i see new folders created but webmatrix stars giving errors saying that those folder already exist on the server; even tho webmatrix was the one who created the folders as part of the upload. Also some files do make it into subfolders

        So this leads me to believe that it creates the folder once and then manages to squeeze in a file or two into those folders before it performs a check for folder existence. once it sees its own folder it quits to prevent overwrites i guess

      • Yishai Galatzer [WebMatrix developer]Yishai Galatzer [WebMatrix developer] commented  ·   ·  Flag as inappropriate

        Greg,

        Thanks for this report. I want to understand a bit better, and I'd appreciate if you can share some more info on your situation.

        Is the subfolder you are uploading to a symbolic link or hidden, or is there anything else special about it? I can take a look at the code tomorrow and see, but a specific example will be super helpful.

        I can't really comment on the memory hogging, since you provided no details. We do expect WM to run as low as about 60-70MB and up to about 150MB.

        Thanks,
        Yishai

      Feedback and Knowledge Base