Announcement: .NET API for automated creation of Users

Need help with FileZilla Server? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Message
Author
TomTheOne
504 Command not implemented
Posts: 10
Joined: 2019-11-04 00:49
First name: Thomas
Last name: Huerlimann

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

#16 Post by TomTheOne » 2019-11-04 01:04

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

uhing
500 Command not understood
Posts: 2
Joined: 2021-09-01 11:50
First name: Kiryl
Last name: Smorgovich

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

#17 Post by uhing » 2021-09-01 12:06

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?

TomTheOne
504 Command not implemented
Posts: 10
Joined: 2019-11-04 00:49
First name: Thomas
Last name: Huerlimann

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

#18 Post by TomTheOne » 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.

uhing
500 Command not understood
Posts: 2
Joined: 2021-09-01 11:50
First name: Kiryl
Last name: Smorgovich

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

#19 Post by uhing » 2021-09-01 19:16

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
Attachments
2021-09-01_22-14-33.png
2021-09-01_22-14-33.png (15.51 KiB) Viewed 7836 times

TomTheOne
504 Command not implemented
Posts: 10
Joined: 2019-11-04 00:49
First name: Thomas
Last name: Huerlimann

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

#20 Post by TomTheOne » 2021-09-01 21:07

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.

User avatar
boco
Contributor
Posts: 26899
Joined: 2006-05-01 03:28
Location: Germany

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

#21 Post by boco » 2021-09-01 23:19

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.
### BEGIN SIGNATURE BLOCK ###
No support requests per PM! You will NOT get any reply!!!
FTP connection problems? Please do yourself a favor and read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
### END SIGNATURE BLOCK ###

ssss
500 Command not understood
Posts: 1
Joined: 2022-02-09 02:20
First name: edanuser
Last name: edanuser

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

#22 Post by ssss » 2022-02-10 01:22

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

TomTheOne
504 Command not implemented
Posts: 10
Joined: 2019-11-04 00:49
First name: Thomas
Last name: Huerlimann

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

#23 Post by TomTheOne » 2022-02-10 04:39

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.

User avatar
botg
Site Admin
Posts: 35491
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

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

#24 Post by botg » 2022-02-10 08:30

The administration protocol was never meant to be used by third-party programs.

TomTheOne
504 Command not implemented
Posts: 10
Joined: 2019-11-04 00:49
First name: Thomas
Last name: Huerlimann

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

#25 Post by TomTheOne » 2022-02-10 09:09

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?

User avatar
botg
Site Admin
Posts: 35491
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

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

#26 Post by botg » 2022-02-10 09:14

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').

TomTheOne
504 Command not implemented
Posts: 10
Joined: 2019-11-04 00:49
First name: Thomas
Last name: Huerlimann

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

#27 Post by TomTheOne » 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.

User avatar
oibaf
Contributor
Posts: 396
Joined: 2021-07-16 21:02
First name: Fabio
Last name: Alemagna

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

#28 Post by oibaf » 2022-02-10 09:58

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.

TomTheOne
504 Command not implemented
Posts: 10
Joined: 2019-11-04 00:49
First name: Thomas
Last name: Huerlimann

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

#29 Post by TomTheOne » 2022-02-10 10:50

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

Post Reply