Page 2 of 2

Re: Announcement: .NET API for automated creation of Users

Posted: 2019-11-04 01:04
by TomTheOne
Hi all

https://sourceforge.net/projects/thufilezillaapi/

- Some options are hardcoded (for example: BypassUserLimit = No or AccessRights: DirList, DirSubdirs, DirCreate, DirDelete, FileRead, FileWrite, FileDelete, FileAppend)
- Requires .NET 4.5.2 and runs under Windows.
- Featured by Miracle.FileZilla.Api 3.2.0

I hope you'll like it and someone can use it as well. Let me know if you have any questions, suggestions and/or complaints.

Best regards
Tom

Re: Announcement: .NET API for automated creation of Users

Posted: 2021-09-01 12:06
by uhing
Hello.
Is it possible to create user with two different folders
i try this command:
thuFileZillaAPI.exe /serveraddr:127.0.0.1 /serverport:14147 /serverpass:mypassword /action:adduser /username:myuser /password:123456 /directory:"D:\ftp\myuser" /acl:DirList,DirSubdirs,FileRead,FileWrite,FileAppend,IsHome /directory:"F:\ftp_backups\myuser" /aliases:"backups" /acl:DirList,DirSubdirs,FileRead,FileAppend

but it create user with only /directory:"F:\ftp_backups\myuser" /aliases:"backups" but first folder is ignored.

Or maybe there is a command to modify existing user and add second folder?

Re: Announcement: .NET API for automated creation of Users

Posted: 2021-09-01 15:42
by TomTheOne
I don't think the FTP server can handle two different directories for one alias.

One directory = one alias, or
One directory = multiple aliases.

Re: Announcement: .NET API for automated creation of Users

Posted: 2021-09-01 19:16
by uhing
TomTheOne wrote:
2021-09-01 15:42
I don't think the FTP server can handle two different directories for one alias.

One directory = one alias, or
One directory = multiple aliases.
i need add one home directory and second one with alias
like on screenshot

Re: Announcement: .NET API for automated creation of Users

Posted: 2021-09-01 21:07
by TomTheOne
Hi

Thanks, the screenshot helped. I usually specify the IsHome directory on the group-level. Try if this helps.

thuFileZillaAPI.exe /serveraddr:127.0.0.1 /serverport:14147 /serverpass:<somepass> /action:addgroup /groupname:uhigroup /directory:"C:\ftp\uhi" /acl:DirList,DirSubdirs,FileRead,IsHome
01.09.2021 21:01:52.551: INFO | thuFileZillaAPI.exe 1.0.1.2
01.09.2021 21:01:52.551: INFO | --- Parameter ---
01.09.2021 21:01:52.566: INFO | /serveraddr: 127.0.0.1
01.09.2021 21:01:52.566: INFO | /serverport: 14147
01.09.2021 21:01:52.566: INFO | /serverpass: <somepass>
01.09.2021 21:01:52.566: INFO | /action: addgroup
01.09.2021 21:01:52.566: INFO | /groupname: uhigroup
01.09.2021 21:01:52.566: INFO | /directory: C:\ftp\uhi
01.09.2021 21:01:52.566: INFO | /aliases: /
01.09.2021 21:01:52.566: INFO | /acl: DirList,DirSubdirs,FileRead,IsHome
01.09.2021 21:01:52.566: INFO | /forcessl: <none>
01.09.2021 21:01:52.566: INFO | /allowIP: <none>
01.09.2021 21:01:52.566: INFO | /disallowIP: <none>
01.09.2021 21:01:52.566: INFO | /passusrlmt: <none>
01.09.2021 21:01:52.566: INFO | /comment: <none>
01.09.2021 21:01:52.566: INFO | --- Parameter ---
01.09.2021 21:01:52.566: INFO | Add requested group.
01.09.2021 21:01:52.582: INFO | Connecting to server.
01.09.2021 21:01:52.660: INFO | Action completed.
01.09.2021 21:01:52.660: INFO | Exit.

thuFileZillaAPI.exe /serveraddr:127.0.0.1 /serverport:14147 /serverpass:<somepass> /action:adduser /username:uhi /password:123456 /groupname:uhigroup /directory:"F:\ftp_backups" /aliases:"backups" /acl:DirList,DirSubdirs,DirCreate,DirDelete,FileRead,FileWrite,FileDelete,FileAppend
01.09.2021 21:03:08.787: INFO | thuFileZillaAPI.exe 1.0.1.2
01.09.2021 21:03:08.787: INFO | --- Parameter ---
01.09.2021 21:03:08.802: INFO | /serveraddr: 127.0.0.1
01.09.2021 21:03:08.802: INFO | /serverport: 14147
01.09.2021 21:03:08.802: INFO | /serverpass: <somepass>
01.09.2021 21:03:08.802: INFO | /action: adduser
01.09.2021 21:03:08.802: INFO | /username: uhi
01.09.2021 21:03:08.802: INFO | /groupname: uhigroup
01.09.2021 21:03:08.802: INFO | /password: 123456
01.09.2021 21:03:08.818: INFO | /directory: F:\ftp_backups
01.09.2021 21:03:08.818: INFO | /aliases: backups
01.09.2021 21:03:08.818: INFO | /acl: DirList,DirSubdirs,DirCreate,DirDelete,FileRead,FileWrite,FileDelete,FileAppend
01.09.2021 21:03:08.818: INFO | /forcessl: <none>
01.09.2021 21:03:08.834: INFO | /allowIP: <none>
01.09.2021 21:03:08.834: INFO | /disallowIP: <none>
01.09.2021 21:03:08.834: INFO | /passusrlmt: <none>
01.09.2021 21:03:08.834: INFO | /comment: <none>
01.09.2021 21:03:08.834: INFO | --- Parameter ---
01.09.2021 21:03:08.834: INFO | Add requested user.
01.09.2021 21:03:08.865: INFO | Connecting to server.
01.09.2021 21:03:09.021: INFO | Action completed.
01.09.2021 21:03:09.021: INFO | Exit.

Would you mind to switch to the sourceforge page to discuss this topic? So other people could benefit from this discussion as well.

Re: Announcement: .NET API for automated creation of Users

Posted: 2021-09-01 23:19
by boco
Please note that the old 0.x server is largely dead. The new 1.x server will come out soon and then 0.x will become unsupported.

Re: Announcement: .NET API for automated creation of Users

Posted: 2022-02-10 01:22
by ssss
hi,
I'm using the Miracle.FileZilla.Api,but it seems that the api does not support the 1.x server,ie comes error ' SocketErrorCode ConnectionRefused',and works well under 0.x server

Re: Announcement: .NET API for automated creation of Users

Posted: 2022-02-10 04:39
by TomTheOne
I did not test it by myself but i heard similar things. And yeah it sounds stupid not beeing backwards compatible. It is what it is.

Re: Announcement: .NET API for automated creation of Users

Posted: 2022-02-10 08:30
by botg
The administration protocol was never meant to be used by third-party programs.

Re: Announcement: .NET API for automated creation of Users

Posted: 2022-02-10 09:09
by TomTheOne
I understand that. It implies, it was never meant to automate tasks related to user configurations. Maybe i have a leak of knowledge here: Are there other solutions for this requirement?

Re: Announcement: .NET API for automated creation of Users

Posted: 2022-02-10 09:14
by botg
The recommended way is to directly change the configuration file and to instruct the server to reload it.

To have FileZilla Server 1.3.0-rc1 reload its config file, send the SIGHUP signal to the service process on *nix and send the paramchange control message to the service on Windows (i.e. 'sc control filezilla-server paramchange').

Re: Announcement: .NET API for automated creation of Users

Posted: 2022-02-10 09:17
by TomTheOne
Yes ok, i know this approach. No offense to anybody, but in my opinion this is an ugly solution. A structured interface is the way to go nowadays.

Re: Announcement: .NET API for automated creation of Users

Posted: 2022-02-10 09:58
by oibaf
TomTheOne wrote:
2022-02-10 09:17
Yes ok, i know this approach. No offense to anybody, but in my opinion this is an ugly solution. A structured interface is the way to go nowadays.
The protocol is open source, it's written in clean C++. It should not be very hard to embed that into a .Net library, if anybody is up to the task.

Re: Announcement: .NET API for automated creation of Users

Posted: 2022-02-10 10:50
by TomTheOne
Jup.

The Miracle.FileZilla.Api declares following compatibility.
FileZilla Server versions supported
Simplified: 0.9.43 or later. If the API are able to connect to the FileZilla server then you are good to go!
Maybe this information is outdated. Need to check if he has updated his sources to make it compatible with > 1.0