Coder Social home page Coder Social logo

ftpserver's People

Contributors

aramis-ci avatar avonheimburg avatar dependabot[bot] avatar erdogankurtur avatar fubar-coder avatar gee19 avatar hytgbn avatar ite-klass avatar kissaki avatar lafe avatar lsvhome avatar mvacha avatar nonegiven avatar omelhus avatar pashcovich avatar patrickhofman avatar rmja avatar robinrodricks avatar thalter avatar wdantuma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ftpserver's Issues

Unable to resolve service for type 'Microsoft.Extensions.Options.IOptions

Hi,

I am getting the follow error when running a .net core 2.0 console app, with the suggested code in Program.cs.

System.InvalidOperationException: 'Unable to resolve service for type 'Microsoft.Extensions.Options.IOptions`1[FubarDev.FtpServer.FtpServerOptions]' while attempting to activate 'FubarDev.FtpServer.FtpServer'.'

Can't get a listing

I can't get a listing using System.Net.FtpClient and FtpServer. I create the server and try a listing and this this the result: https://github.com/talanc/FtpServerTest/blob/master/FtpServerTest/TestCreated.ClientError.txt

I ran the Sample Ftp Server provided and here's the server log: https://github.com/talanc/FtpServerTest/blob/master/FtpServerTest/TestLocal.ServerDebug.txt

I thought I might be using System.Net.FtpClient incorrectly, but I've included a Test Case for ftp.gnu.org and it works.

Is it something on my computer I need to do?

Getting current user for a given FileSystem?

I'm building a custom FileSystem provider using cloud storage, and I need to be able to pull the current FtpUser authenticated by the membership provider. I can't seem to find any way the file system is able to know anything about the current user (or connection) except the username, which isn't very useful for my purposes. Is this possible or do I just need to re-create the FtpUser within the FileSystem class?

Can't connect with FileZilla

Environment: Windows 10

Steps to reproduce:

  1. Follow quick start guide
  2. Connect to localhost with the FileZilla FTP client

Results:

image

Everything works fine when connecting to localhost with another FTP client, like WinSCP or just Google Chrome.

Even though the quick start server is not configured for TLS, I think FileZilla will always try to connect with FTPS/SFTP/whatever before falling back to unencrypted. When connecting to other FTP servers without encryption, FileZilla always logs a message like "server does not support FTP over TLS" as it connects. With the Fubar FtpServer, we never get far enough to see that message. So the issue might be the server not gracefully handling FileZilla's attempt to initiate a TLS connection.


Related issue: I have also deployed an FtpServer instance to a remote server and set up FTPS on it with a proper certificate. That seems to be working fine, as I can connect to it with WinSCP and it apparently succeeds with an encrypted connection.

image

In this scenario, FileZilla gets a little further than previously, but it still has issues. It's able to connect, prompting me to trust the certificate, and logs in successfully, but then dies with another TLS-related error when attempting to get the directory listing.

image

Membership Provider only supports synchronous validations

The current implementation of the IMembershipProvider only offers a synchronous endpoint. This means that using APIs with asynchronous endpoints to perform the validation is more difficult than it should be, especially since the calling code is already async.

FtpCommandCollector does not work correctly with windows-1251 encoding

It appears when filenames contain cyrillic characters. Unit-test for explain:

// Copyright, etc...

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Xunit;

namespace FubarDev.FtpServer.Tests
{
    public class FtpCommandCollectorTests
    {
        [Fact]
        public void TestWithWindows1251Encoding()
        {
            var encoding = Encoding.GetEncoding(1251) // Encoding.Default;
            var collector = new FtpCommandCollector(() => encoding);

            const String cyrillicSymbols = "абвгдеёжзийклмнопрстуфхцчшщыъьэюя";

            var expectedCommands = new[] {new FtpCommand("TEST", cyrillicSymbols)};

            var stringToTest = String.Format("TEST {0}\r\n", cyrillicSymbols);
            var actualCommands = Collect(collector, stringToTest).ToArray();

            // Test failed
            // TELNET: Unknown command received - skipping 0xFF
            // 0xFF == 'я' (maybe?)
            Assert.Equal(expectedCommands, actualCommands, new FtpCommandComparer());
            Assert.True(collector.IsEmpty);
        }

        // Collect, FtpCommandComparer, etc...
    }
}

Cannot connect using version 2.2.0

Hi!

I can't connect to the FTP server using version 2.2.0, but 2.1.1 works great. Am i doing something wrong? I tried with both WinSCP, FileZilla and the Windows ftp command.

I am using Windows 10 Pro, Version 1809 (OS Build 17763.437). I also tried on Windows Server 2016 Version 1607 (OS Build 14393.2724).

Here is a minimal example. ConsoleAppFtpServer21 works for me but i cannot connect using ConsoleAppFtpServer22.

I also included the logs from WinSCP here and from FileZilla here. They do not say much though.

Love this project by the way, great work! 👍

Request for complete Documentation

I like this library from first launch and using it for my simple project.
But after updating to 2.0.0-beta.36, I get lost in everything.

Please update to the newest documentation.
Just simple explanation with rich syntax for every feature.

Thank you very much

Is there a way to make server work without pasv

Im having trouble running docker image with mapping of pasv ports.
If you do
docker run -p 3000-4000:3000-400 -p 21:21 myFTPimage

The command will hand for a while and then fail
As the docker engine will not be able to create so many port mapping ..

So I figured there must be a way to configure the server to work without pasv. Is there ?

GnuTLS bails with error 110 when opening data connections

When opening passive connections with a client that uses GnuTLS, it errors out with the error 110 "The TLS connection was non-properly terminated." Note that this only occurs for data connections. The initial STARTTLS and subsequent login work fine.

Log below (from FileZilla):

Status:	Verbinde mit 127.0.0.1:2121...
Status:	Verbindung hergestellt, warte auf Willkommensnachricht...
Status:	Initialisiere TLS...
Status:	Überprüfe Zertifikat...
Status:	TLS-Verbindung hergestellt.
Status:	Angemeldet
Status:	Empfange Verzeichnisinhalt...
Befehl:	PWD
Antwort:	257 "/"
Befehl:	TYPE I
Antwort:	200 Binary transfer mode active.
Befehl:	PASV
Antwort:	227 Entering Passive Mode (127,0,0,1,217,65).
Befehl:	MLSD
Antwort:	150 Opening data connection.
Fehler:	GnuTLS-Fehler -110 in gnutls_record_recv: The TLS connection was non-properly terminated.
Status:	Server hat die TLS-Verbindung nicht ordnungsgemäß geschlossen
Fehler:	Could not read from transfer socket: ECONNABORTED - Verbindung abgebrochen
Antwort:	226 Closing data connection.

Documentation: Integration of FTP server with ASP.NET Core

With 3.0 we're now able to use the ASP.NET Core infrastructure to host the FTP server. We need to create a documentation and a sample application.

  • Microsoft.Extensions.Hosting
    • Documentation
    • Example
  • ASP.NET Core
    • Documentation
    • Example

Port 0 is not allowed

The MultiBindingTcpListener does not allow 0 as port parameter in the constructor. But port 0 is a valid parameter of the TcpListener class. "Specify Any for the local IP address and 0 for the local port number if you want the underlying service provider to assign those values for you. "

Scenario:
In integration tests we want to start multiple FTP servers in parallel without specifying the port number. Once the FTP server is started the assigned port is read and used in the corresponding FTP clients.

Error with validateScopes = true using version 3.0rc4

Hi!

When i build the service provider with validation of scopes like this:
services.BuildServiceProvider(validateScopes: true)

I get this error:
Cannot resolve scoped service 'FubarDev.FtpServer.Commands.IFtpCommandHandlerProvider' from root provider.

ValidateScopes is also true when using CreateDefaultBuilder in ASP.NET Core which is where i encountered the issue.

Here is a minimal example of the issue, if i remove validateScopes i can connect but with it the application crashes.

Great work with 3.0, looking foward to the release!

/Ludvig

Does FubarDev allow non-anonymous authentication?

Hi!

Thanks for providing this library; it's really useful.

We'd like to mock an SFTP server using non-anonymous authentication. Is that possible with (the latest release of) FubarDev/FtpServer?

Best regards,

Caleb

Listener address on remote server

Because the ServerAddress setting is a literal string that gets fed through Dns.GetHostAddressesAsync, there is no way to specify IPAddress.All in the TcpListener, which would be convenient for hosting on a remote server where you don't want to have to add in the VM's hostname or local IP.

Callback when command processed

Is there anyway to run some custom code after certain commands have run.

IE. I'd like to kick off another part of my app after a file has been uploaded

Only way so far I can tell would be to create my own commandhandlerfactory and provide my own implementations of the existing commands using inheritance.

FtpServer custom ftp user v2.1.1

Hello,

I'm unable to get the custom FTP user to work.

Scenario:
connect with a simple username+password to the ftp server.

It worked before with version 1.3.7, but with the newer version, I'm not sure how to implement this.

Would it be possible to write a small & easy example?

Best regards & Thanks,
Kyndeyrn

Firefox doesn't show first item in directory

Steps to reproduce: Create an FtpServer instance serving a directory with more than one file/folder. Navigate to the server in Firefox. Observe that the (alphabetically) first entry in your directory, whether it's a file or folder, is not shown by Firefox.

This might be a bug in Firefox, since all other clients I've tested (including Chrome) don't have this problem, but I wanted to document it here anyway.

Firefox's internal FTP logging shows it executing PASV followed by CWD / followed by LIST when displaying the directory listing. Unfortunately it doesn't display the data received or how it's interpreting that data, so I want to investigate this a little more.

If I can't find anything, I think this can probably be closed sooner rather than later.

Google Cloud Storage as file system

Hi,

I implemented Google Cloud Storage as a backend in this project and, just as I published it, I realized it would probably be a much better idea to just include it in your project.

Could you help me out make the changes required and create the pull request? The bulk of the work is already done, as all of the interfaces have already been implemented and tested.

If needed, I could provide a Google Cloud Storage bucket for testing.

Looking forward to hearing from you. 😃

IFtpServerHost could not be found

using version 2.2.1
and implementing the getting started example this line will not compile.
//Initialize the FTP server
var ftpServerHost = serviceProvider.GetRequiredService<IFtpServerHost>();

CS0246 The type or namespace name 'IFtpServerHost' could not be found (are you missing a using directive or an assembly reference?) FtpApiServer D:\Sources\FtpApiServer\Program.cs

Server does not check if current directory (still) exists.

Steps to reproduce:

  1. User1 connects, creates directory abc and changes current directory to abc
  2. User2 connects, deletes directory abc
  3. User1 attempts to do some action with his current directory (e.g. upload a file)
  4. DirectoryNotFoundException is thrown and 501 Syntax error in parameters or arguments. is returned to User1

Affected commands:
At least PWD, CWD, STOR

Log with full exception:

[LOG - 192,168,1,121,205,45] [TRC] STOR cam2_802814741_20180421185452334_MOTION_DETECTION.jpg
[LOG - 192,168,1,121,205,45] [DBG] 150 Opening connection for data transfer.
[LOG - 192,168,1,121,205,45] [ERR] Error while processing background command STOR cam2_802814741_20180421185452334_MOTION_DETECTION.jpg
[LOG - 192,168,1,121,205,45] [EXP] System.AggregateException: One or more errors occurred. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\aa\bb\cc\192.168.1.121\2018_04_21-2018_04_21\cam2_802814741_20180421185452334_MOTION_DETECTION.jpg'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at System.IO.FileInfo.Create()
   at FubarDev.FtpServer.FileSystem.DotNet.DotNetFileSystem.<CreateAsync>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at FubarDev.FtpServer.CommandHandlers.StorCommandHandler.<Process>d__3.MoveNext()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\aa\bb\cc\192.168.1.121\2018_04_21-2018_04_21\cam2_802814741_20180421185452334_MOTION_DETECTION.jpg'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at System.IO.FileInfo.Create()
   at FubarDev.FtpServer.FileSystem.DotNet.DotNetFileSystem.<CreateAsync>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at FubarDev.FtpServer.CommandHandlers.StorCommandHandler.<Process>d__3.MoveNext()<---

[LOG - 192,168,1,121,205,45] [WRN] 501 Syntax error in parameters or arguments.

Create nuget packages with symbols and add them to Nuget.

All that is necessary is to add -symbols to the nuget pack call and upload the additional .symbols.nupkg files to Nuget. Then anybody who has symbol server configured in VS can debug the nuget package (step into, breakpoints etc.. works).

Remote ip address in custom FileSystem

Hi,

I ran into an obstacle, and I am not quite sure if I am approaching it from the right angle.

I have created a custom MembershipProvider, where ValidateUserAsync does the authentication and then returns a custom IFTPUser back so that I have some extra information available later on.

However, now I need to get the RemoteIP address. The current call into IMembershipProvider.ValidateUserAsync can not provide that to me, as it only has username/password.

In the end, I need the remoteIP address in a custom IUnixFileEntry. It calls a remote service, which needs the original remote IP for logging purposes etc.

The remote IP address is obviously available somewhere, but how can I get that at the creation of my filesystem?

Lots of issues compiling this

I'm using VS2013.

1>------ Build started: Project: FubarDev.FtpServer.FileSystem, Configuration: Debug Any CPU ------
2>------ Build started: Project: FubarDev.FtpServer.AccountManagement, Configuration: Debug Any CPU ------
1>C:\Downloads\FtpServer-master\FtpServer-master\FubarDev.FtpServer.FileSystem\FileSystemExtensions.cs(197,31,197,32): error CS1056: Unexpected character '$'
1>C:\Downloads\FtpServer-master\FtpServer-master\FubarDev.FtpServer.FileSystem\FileSystemExtensions.cs(211,28,211,29): error CS1056: Unexpected character '$'
1>C:\Downloads\FtpServer-master\FtpServer-master\FubarDev.FtpServer.FileSystem\ListSegment.cs(29,34,29,36): error CS1514: { expected
1>C:\Downloads\FtpServer-master\FtpServer-master\FubarDev.FtpServer.FileSystem\ListSegment.cs(29,41,29,42): error CS1519: Invalid token '[' in class, struct, or interface member declaration
1>C:\Downloads\FtpServer-master\FtpServer-master\FubarDev.FtpServer.FileSystem\ListSegment.cs(29,50,29,51): error CS1003: Syntax error, ']' expected
1>C:\Downloads\FtpServer-master\FtpServer-master\FubarDev.FtpServer.FileSystem\ListSegment.cs(29,50,29,51): error CS1519: Invalid token '+' in class, struct, or interface member declaration
1>C:\Downloads\FtpServer-master\FtpServer-master\FubarDev.FtpServer.FileSystem\ListSegment.cs(29,57,29,58): error CS1519: Invalid token ']' in class, struct, or interface member declaration
1>C:\Downloads\FtpServer-master\FtpServer-master\FubarDev.FtpServer.FileSystem\MemoryTemporaryData.cs(29,26,29,28): error CS1002: ; expected
1>C:\Downloads\FtpServer-master\FtpServer-master\FubarDev.FtpServer.FileSystem\MemoryTemporaryData.cs(29,35,29,36): error CS1519: Invalid token '.' in class, struct, or interface member declaration
1>C:\Downloads\FtpServer-master\FtpServer-master\FubarDev.FtpServer.FileSystem\MemoryTemporaryData.cs(29,43,29,45): error CS1519: Invalid token '??' in class, struct, or interface member declaration
2> FubarDev.FtpServer.AccountManagement -> C:\Downloads\FtpServer-master\FtpServer-master\FubarDev.FtpServer.AccountManagement\bin\Debug\FubarDev.FtpServer.AccountManagement.dll
3>------ Build started: Project: FubarDev.FtpServer.FileSystem.DotNet, Configuration: Debug Any CPU ------
4>------ Build started: Project: FubarDev.FtpServer, Configuration: Debug Any CPU ------
3>CSC : error CS0006: Metadata file 'C:\Downloads\FtpServer-master\FtpServer-master\FubarDev.FtpServer.FileSystem\bin\Debug\FubarDev.FtpServer.FileSystem.dll' could not be found
4>CSC : error CS0006: Metadata file 'C:\Downloads\FtpServer-master\FtpServer-master\FubarDev.FtpServer.FileSystem\bin\Debug\FubarDev.FtpServer.FileSystem.dll' could not be found
5>------ Build started: Project: TestFtpServer, Configuration: Debug Any CPU ------
5>CSC : error CS0006: Metadata file 'C:\Downloads\FtpServer-master\FtpServer-master\FubarDev.FtpServer\bin\Debug\FubarDev.FtpServer.dll' could not be found
5>CSC : error CS0006: Metadata file 'C:\Downloads\FtpServer-master\FtpServer-master\FubarDev.FtpServer.FileSystem\bin\Debug\FubarDev.FtpServer.FileSystem.dll' could not be found
5>CSC : error CS0006: Metadata file 'C:\Downloads\FtpServer-master\FtpServer-master\FubarDev.FtpServer.FileSystem.DotNet\bin\Debug\FubarDev.FtpServer.FileSystem.DotNet.dll' could not be found
========== Build: 1 succeeded, 4 failed, 0 up-to-date, 0 skipped ==========

Server does not send welcome message after initial socket connection

I downloaded the latest code yesterday and built it. The TestFtpServer project will work for me (i.e. I can start it debugging from within Visual Studio and connect to it with a FileZilla client). However, when I tried to make a minimal server example using the library, the server never sends the welcome message after a client connects. I verified with WireShark, only the TCP connection is established, nothing beyond that.

I even tried using the same code another user posted for a fixed bug, but the problem remains the same. Here is the code I am currently using:

using System;
using System.IO;
using FubarDev.FtpServer;
using FubarDev.FtpServer.FileSystem.DotNet;
using Microsoft.Extensions.DependencyInjection;

namespace SimpleFtpConsoleTest
{
    class Program
    {
        

        static void Main(string[] args)
        {
            // Setup dependency injection
            var services = new ServiceCollection();

            // use %TEMP% as root folder
            services.Configure<DotNetFileSystemOptions>(opt => opt
                .RootPath = Path.GetTempPath());

            // Add FTP server services
            // DotNetFileSystemProvider = Use the .NET file system functionality
            // AnonymousMembershipProvider = allow only anonymous logins
            services.AddFtpServer(builder => builder
                .UseDotNetFileSystem() // Use the .NET file system functionality
                .EnableAnonymousAuthentication()); // allow anonymous logins

            // Configure the FTP server
            services.Configure<FtpServerOptions>(opt => opt.ServerAddress = "127.0.0.1");
            services.Configure<FtpServerOptions>(opt => opt.Port = 44421);

            // Build the service provider
            using (var serviceProvider = services.BuildServiceProvider())
            {
                // Initialize the FTP server
                var ftpServer = serviceProvider.GetRequiredService<IFtpServer>();

                // Start the FTP server
                ftpServer.Start();

                Console.WriteLine("Press ENTER/RETURN to close the test application.");
                Console.ReadLine();

                // Stop the FTP server
                ftpServer.Stop();
            }
        }
    }
}

LIST/NLST arguments

According to RFC959, it should be possible to specify a directory when listing using NLST or LIST. It would seem they are both implemented in a way that would allow specifying masks (which has no backing the the RFC at all, as far as I can see), but ignores the path.

It is my understanding that FtpServer implements these commands incorrectly.

readTask sometimes stuck on USER command.

Hi,
I'm trying to test FtpServer behavior on osx using Xamarin with Mono 4.2.4 as well as 3.10.0.
This happens mostly when I try to make multiple concurrent connection to ftp server, but also happens when I try to reconnect.

After some debugging, I found that readTask doesn't complete after ftp client sends USER command. I checked tcpdump and confirmed that server ACK'd USER command part.
Interestingly, when I change readTask to synchronous Read() instead of ReadAsync() it could read correct full USER command. Also, if I change the size of buffer in ProcessMessages() to 16, which is "USER anonymous\r\n", it always success to read.

I don't have many experiences on C# especially on OSX. Have you experienced this case before?

Thanks,
hytgbn

Bind on 0.0.0.0

Hi,

When I listen on 0.0.0.0 it throw an error, do you know the reason ?

IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address

You need to change public string ServerAddress { get; set; } to a IPAddress to add the possibility to use IPAddress.Any or simply add a wildcard like *

Thanks

Deny new Connections but not drop existing

Is there a way to deny new connections to the server (stop the listener) without stopping existing connections? I would like to implement the ability to wait for connections to exit before Stop is processed.

master source code download vs NuGet packages

I created a small test FTP server (with some custom connection handling) using master source code (by downloading the .zip file).

Now, I am trying to compile it against the NuGet package (I have tried the 2.0.0 and v3.0.0-beta3) but my application does not compile. It looks like number of classes have changed (e.g. PassCommandHandler and FtpConnection having different signatures as compared to the downloaded source code).

Any suggestion on resolving these issues will be appreciated.

Intercept request

I'm using this library to setup a "fake" FTP server. I need to call my API every time a file is uploaded. I've noticed there is a FtpCommandHandlerExtension abstract class, however I couldn't managed to find an extension point where I could register my handlers. I've searched and it doesn't seem that you support middleware/handlers/interceptors. Is this correct? If so, where should I start looking in the sources to implement this myself?

Homedirs

Hi,

Nice project guys :)
If I would like users to be mapped to a virtual homedir - is that an "Enhancement" or is it possible to use an existing FilesystemProvider for that?

Keep up the good work.
Thomas.

Server consumes a lot of CPU

When idle the FtpServer is consuming a lot of CPU time, browsing trough the code i think the problematic part is in FtpServer.cs in

while (!Stopped)
{
    if (listener.TryGetPending(out var tcpListener))
    {
        var acceptTask = tcpListener.AcceptTcpClientAsync();
        acceptTask.Wait(_cancellationTokenSource.Token);
        var client = acceptTask.Result;
        AddClient(client);
        continue;
    }

    Thread.Sleep(0);
}

When i can find the time i will try to prepare a fix.

Custom root folders for users

Is there a way to define flexible root folders on the level of users?
I found a way to use root folder per user with UseRootPerUser() but is is not providing enough flexiibilty for my case.

Shared files support? Partially working.

I was able to view shared files by adding and sharedWithMe=true to the GetChildrenAsync and FindChildByNameAsync methods in GoogleDriveFileSystem.cs. However, they don't appear to actually work when you click on the items in the FTP listing and trying to make them work is a bit outside the scope of my experience (having only discovered this today).

Is there any chance you could add support for files shared with you? I'm referring to folders/files that you right click and hit "Add to My Drive".

Thanks for your time, and keep up the awesome work :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.