HomeDir (General questions)
If the HomeDir property is not correctly set during login, is there a directory that the SSH Server component defaults to? I ask, as I have found an anomally where for some reason the HomeDir did not get set, and on one occassion allowed access to the A: and on another occassion gave access to the desktop.
Re: HomeDir
Jason,
I have checked the source - homedir is not used at all in Telnet/SSH, only in SFTP protocol. This would explain results you were getting.
Re: HomeDir
That's correct. The results I was getting were through automated SFTP connections - I'm not allowing any connections other than SFTP onto the server by checking whether or not ServiceType = stSubSystem. Once login occurs (in the LoginPassword or LoginPubKey event) I set the homedir equal to a parameter in the program, which is initally set via a textbox on the form. This parameter doesn't change once the server is started. Most of the time the automated sftp program I have created goes into the correct directories, getting the information it needs. Every now and then, however, it seems that the HomeDir doesn't get set for some reason or another and sends the SFTP connection to places like the A: and the desktop. Any ideas on why this would occur?
Re: HomeDir
Jason,
are you absolutely sure you're setting Homedir property to same value? Can you put some error-trapping in your code that dumps this value to some log - just to remove possibility of your error.
In the meantime I'll look if there's any chance in our code that could lead to this.
Do you have some idea how to duplicate this issue?
Re: HomeDir
I can't actually duplicate it, as it seems very sparatic. I'll add code to the server portion to log the value, and let you know what I find.