Previous Next

Thread: FTP home directory

Last post 07-30-2008 7:01 PM by ryancammer. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 07-28-2008, 7:01 AM

    FTP home directory

    I wish to authenticate ftp users and set their home directory(user isolation) programmatically.

    I have implemented the solution to authenticate ftp users described in this link

    http://blog.ryancammer.com/2008/07/06/custom-authentication-with-microsoft-ftp-7/

    however I am having problems setting the home directory. I see that there is an interface IFtpHomeDirectoryProvider

    And a method

    public string GetUserHomeDirectoryData(string sessionId, string siteName, string userName)

    which I could implement (if this is what i think it is).

    My question is how do I configure "Microsoft FTP Service for IIS 7.0" to use this method or is there another way to programmatically set the home directory?

    Note: We have thousands of ftp users so configuring virtual directories is not really an option I want to consider.

  • 07-29-2008, 3:15 AM In reply to

    • DanielVL
    • Top 50 Contributor
    • Joined on 10-07-2006, 6:00 PM
    • Redmond, WA, USA
    • Posts 74

    Re: FTP home directory

    Hi ctrlaltdel !

    As you can read in Ryan's blog, this is not a public feature so it is not supported and things may change dramatically for the next release (renaming, adding / removing parameters or even remove the interface). I think you may end finding the way to configure it but I would encorage you to wait until it is supported.

    Thank you.

    Daniel Vasquez Lopez
    IIS Team
  • 07-29-2008, 9:21 AM In reply to

    Re: FTP home directory

    As this is critical to our business we must be able to set the home directory. The Linux guys here had it done in a few minutes and we needed to the same for windows, else it was the bullet for MS ftp. Future changes can be dealt with later.

    I think i have managed to get it to work by adding the following to the site ftpServer node

    <security>
      <authentication>
        <basicAuthentication enabled="false" />
        <customAuthentication>
          <providers>
           <add name="CustomFtp" enabled="true" />
         </providers>
        </customAuthentication>
      </authentication>
    </security>
    <customFeatures impersonationLevel="Identify">
      <providers>
        <add name="CustomFtp" enabled="true" />
      </providers>
    </customFeatures>
    <userIsolation mode="Custom"/>

    Also 

    <system.ftpServer>
            <providerDefinitions>
                <add name="IisManagerAuth"  ....          
                <add name="AspNetAuth"      .....      
                <add name="CustomFtp"
                     type="Namespace.CustomFtpProvider,CustomFtp,version=1.0.0.0,
                              Culture=neutral,PublicKeyToken=:::::::::::::: />
            </providerDefinitions>

    and then simply implement GetUserHomeDirectoryData and AuthenticateUser in CustomFtpProvider class

  • 07-30-2008, 7:01 PM In reply to

    • ryancammer
    • Not Ranked
    • Joined on 11-09-2007, 5:20 PM
    • Los Angeles, CA
    • Posts 8

    Re: FTP home directory

    i meant to work on it last night, but got caught up trying to make a command line interpreter for myspace (gimme a couple weeks on it), like rod mcfarland's wordpress cli...

    all right, tonight i'll see what kind of damage i can do.

Page 1 of 1 (4 items)
Page view counter