-
|
I'm going to be running some tests with sftpgo over the next few days since I'd like to try and replace our existing CrushFTP usage with sftpgo if I can so I need to run through a couple of scenarios to make sure things would work. I'll be running sftpgo on a Windows server and already have it installed and running at the moment and experimented with some basic situations with some manually created users earlier today. Now, I'm progressing to trying to experiment with the External Authentication option, however I have been running into a few issues with it in my testing so far. Since I'm on Windows, a PowerShell script would be the obvious choice to use, but in my initial tests with a PowerShell script I wasn't sure how sftpgo would be executing the script (I looked up some options to potentially make the PowerShell script able to be executed directly by creating a shortcut as suggested here: https://stackoverflow.com/questions/10137146/is-there-a-way-to-make-a-powershell-script-work-by-double-clicking-a-ps1-file). In this scenario, it wasn't clear if sftpgo had executed the PowerShell script at all (I need to expand on my simple script I was utilizing and add some more logging info to see if it is getting triggered), but the sftpgo.log file only had minimal output like this: Next, I went ahead and did something similar, but this time with a simple PHP script which I tried on two different servers. I ended up trying it on two different servers because on the first one I received the x509 error shown below: And I thought that might be due to the first server having a Let's Encrypt SSL certificate being used. But I tried against a second server, which uses a DigiCert SSL certificate, and I received the same error message, so I'm not really sure what that error is referring to at the moment since both of these servers have valid SSL certificates in place, but I believe the error is an indication that SFTPGo is not even proceeding to the next step and actually POSTing the data so that it can be verified by the script. I'm planning on sharing the details of my setup once I have things working properly to hopefully provide as an example for others. Our main use case is to be able to provide a space for staff to be able to upload files via SFTP, and then in combination with Caddy, those files will be able to be served by Caddy publicly. In addition, as part of my script above, I'm hoping that a "private" virtual folder will also be able to be assigned to each staff member, and any files in there will be stored separately from the location that Caddy is serving, so those won't be publicly accessible. At the moment, I'm not sure if I'm going to be able to have the virtual folder included immediately (I'd like it to be created on the fly if possible, but the current design seems to point to needing to create folders separately from the users and then associating them with a user...and then in addition to that, the virtual folders need to also be created manually...while SFTPGo handles creating the user's home directory folder automatically from what I saw earlier today, it won't do the same thing when it comes to the virtual folders so I may have to create a separate process that assists with that, since it seems to be an explicit design choice...basically though, I do want to have things organized specifically by each user's username...in CrushFTP there was a specific option flag that could be enabled that allowed for that, but so far I'm not seeing something equivalent available as an option, but I was hoping that the External Authentication + REST API functionality would allow me to create something equivalent, but today was just my first day experimenting with SFTPGo, so I still have a fair amount more experimenting to go, but hopefully these details are helpful for anybody that might already have some more experience and could provide some tips for me. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
|
Hi, there are several questions here:
|
Beta Was this translation helpful? Give feedback.
-
|
Thank you Nicola for the response!
I am technically going to be using LDAP (and possibly some user database access on our end) via the External Authentication option to try and achieve something like what we are doing in CrushFTP currently, so I'm mainly working my way through the capabilities SFTPGo currently offers to try and work within the functionality available. If you don't mind, I'm going to send you an email separately just with some additional details I can't as easily share publicly here that might also help explain our current SFTP usage/setup a little better as well, but overall I'm really liking the capabilities I'm seeing at the moment so I think a lot of what I'm experiencing right now is simply the learning curve of experimenting with and adopting a new system :-). |
Beta Was this translation helpful? Give feedback.
-
|
For anybody in a similar boat as myself that wants to add in LDAP authentication into their environment (specifically with Active Directory), then please take a look at the following mini-project: If you already have a PHP web server with LDAP installed you can use the code to connect to one or more Active Directory servers, and set things up in such a way that each user gets their own folder automatically, which is the primary use case I have for my environment. In addition to being able to work from a web server, I made the code do double-duty and it can also function from the CLI. It's not quite as performant as a Golang solution at the moment, but there's probably still some room for improvement with the CLI option I'm using right now (I used the ExeOutput for PHP tool to help generate the EXE, which embeds the index.php from the project above, and the PHP runtime, but the rest of the files can still be modified separately, allowing for customization for your environment if needed). I'm happy to help any others that might want to try using it and end up with some questions, but a lot of thanks must be shared with Nicola as well for helping to answer my questions (both here and via email) over the past few days. Thank you! |
Beta Was this translation helpful? Give feedback.
For anybody in a similar boat as myself that wants to add in LDAP authentication into their environment (specifically with Active Directory), then please take a look at the following mini-project:
If you already have a PHP web server with LDAP installed you can use the code to connect to one or more Active Directory servers, and set things up in such a way that each user gets their own folder automatically, which is the primary use case I have for my environment.
In addition to being able to work from a web server, I made the code do double-duty and it can also function from the CLI. It's not quite as performant as a Golang solution at the …