Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4k views
in CompleteFTP by (320 points)
We're working on a user authentication extension to utilize our existing database for credential lookup. In general everything works very well but I have a question regarding how the user's home directory is set.

Say you have defined in CompleteFTP Administrator the following folder structure:
\Test - virtual folder
    \Users - virtual sub-folder
        \userid - Windows folder mapped to C:\FTP\userid


When the user authenticates, we set the (now obsolete) HomeDirectory property of the IAuthenticationInfo interface to "/Test/Users/userid", but this then creates a folder on the hard drive at "C:\Test\Users\userid" instead of mapping to "C:\FTP\Userid" like the folders defined in CompleteFTP admin.

The appears to be the case when we override LoadUserInfo and call base.CheckUserName in our CheckUserName method override as well.

So the questions are:
1. What are we supposed to set for Home Directory? Should it be a physical Windows path?
2. Is there a way to retrieve the list of folders that were defined in CompleteFTP admin to translate a virtual folder tree to a Windows path?

Thanks,

Bob Mc.

2 Answers

0 votes
by (51.4k points)
1. What are we supposed to set for Home Directory? Should it be a physical Windows path?


Yes, the Windows path.

2. Is there a way to retrieve the list of folders that were defined in CompleteFTP admin to translate a virtual folder tree to a Windows path?


No, but a feature that's currently available in beta might help you. It allows you to place macros in the names of folders in the virtual file system. You could therefore define a directory-structure as follows:
/Test
    /Users
        /%UserName%

If you set the %UserName% folder as the home of the defaultDatabase user, so that when user, JoeBloggs, logs in, he'll see the path of his home folder as /Test/Users/JoeBloggs. I'm not sure if that's what you're aiming for, but it seems relevant.

Please support@enterprisedt.com if you'd like to try that feature and I'll send you a link.

- Hans (EnterpriseDT)
0 votes
by (320 points)

No, but a feature that's currently available in beta might help you. It allows you to place macros in the names of folders in the virtual file system. You could therefore define a directory-structure as follows:
/Test
    /Users
        /%UserName%

If you set the %UserName% folder as the home of the defaultDatabase user, so that when user, JoeBloggs, logs in, he'll see the path of his home folder as /Test/Users/JoeBloggs. I'm not sure if that's what you're aiming for, but it seems relevant.

Please support@enterprisedt.com if you'd like to try that feature and I'll send you a link.

- Hans (EnterpriseDT)


Yes, that's pretty much what we're looking for. However, since we need this in production pretty quickly we'll work around it in the authentication extension and when the feature is out of beta we'll retrofit then.

Thanks.

Categories

...