Search found 83 matches: xml reload config

Searched query: xml reload config

by boco
2011-08-24 19:27
Forum: FileZilla Server Support
Topic: Changing password via PHP script
Replies: 1
Views: 1282

Re: Changing password via PHP script

Only way is to edit the FileZilla Server.xml directly (the passwords are stored as plain MD5 hash, before that question comes up) and call "FileZilla Server.exe" /reload-config afterwards.
by boco
2011-08-19 23:53
Forum: FileZilla Server Support
Topic: Importing Users from another FTP Server
Replies: 10
Views: 5669

Re: Importing Users from another FTP Server

After copying the new XML over the old one while FZ Server is still running, you must call the FileZilla Server.exe with the parameter /reload-config once.
by boco
2011-06-02 01:41
Forum: FileZilla Server Support
Topic: Move Server to new hardware
Replies: 8
Views: 18307

Re: Move Server to new hardware

Did you restart the server service or run the "FileZilla Server.exe" /reload-config command after copying the XML?
by mbattaglia
2011-05-20 16:36
Forum: FileZilla Server Support
Topic: /reload-config not working. Must restart service.
Replies: 20
Views: 11035

Re: /reload-config not working. Must restart service.

Ok, I give up. I was able to successfully get the two unique HWNDs which, according to the C code, are used to receive the window message. However after posting the mesage to these window, the FileZilla Server UI still doesn't show any changes that were manually entered into the FileZilla Server.xml file.

Below is the code that I am using. The method called FileZillaServerReloadConfig() is what starts everything.

VB6:

Code: Select all

Option Explicit

Private Const MAX_PATH = 260

Private Const WM_APP = &H8000
Private Const WM_FILEZILLA_RELOADCONFIG = WM_APP

Private Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hWnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hWnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hWnd As Long) As Long
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long

Private mWindowHandlesInfo As String

Public Function GetWindowHandles() As String
    On Error GoTo Unexer
    
    mWindowHandlesInfo = vbNullString
    
    Call EnumWindows(AddressOf EnumWindowProc, &H0)
    
    GetWindowHandles = mWindowHandlesInfo
    
    Exit Function
Unexer:
    Debug.Print "ERROR (GetWindowHandles): " & Err.Description
End Function
Public Function EnumWindowProc(ByVal hWnd As Long, ByVal lParam As Long) As Long
    'working vars
    Dim nSize As Long
    Dim sTitle As String
    Dim sClass As String
    Dim pos As Integer
    
    'set up the strings to receive the class and
    'window text. You could use GetWindowTextLength,
    'but I'll cheat and use MAX_PATH instead.
    sTitle = Space$(MAX_PATH)
    sClass = Space$(MAX_PATH)
    
    Call GetClassName(hWnd, sClass, MAX_PATH)
    Call GetWindowText(hWnd, sTitle, MAX_PATH)
    
    If LenB(mWindowHandlesInfo) <> 0 Then
        mWindowHandlesInfo = mWindowHandlesInfo & Chr$(255)
    End If
    
    'strip the trailing chr$(0)'s from the strings
    'returned above and add the window data to the list
    mWindowHandlesInfo = mWindowHandlesInfo & CStr(hWnd) & Chr$(254)
    mWindowHandlesInfo = mWindowHandlesInfo & TrimNull(sClass) & Chr$(254)
    mWindowHandlesInfo = mWindowHandlesInfo & TrimNull(sTitle)
                        
    'to continue enumeration, we must return True
    '(in C that's 1).  If we wanted to stop (perhaps
    'using if this as a specialized FindWindow method,
    'comparing a known class and title against the
    'returned values, and a match was found, we'd need
    'to return False (0) to stop enumeration. When 1 is
    'returned, enumeration continues until there are no
    'more windows left.
    EnumWindowProc = 1
End Function
Private Function TrimNull(item As String)
    'remove string before the terminating null(s)
    Dim pos As Integer
    
    pos = InStr(item, Chr$(0))
    
    If pos Then
        TrimNull = Left$(item, pos - 1)
    Else
        TrimNull = item
    End If
End Function

' mjb 05/20/11
Public Sub FileZillaServerReloadConfig()
    Dim WindowHandlesInfo As String
    Dim Array1() As String
    Dim Ubnd1 As Long
    Dim Index1 As Long
    Dim Array2() As String
    Dim Ubnd2 As Long
    Dim Index2 As Long
    
    Dim hWnd As Long
    Dim WindowClass As String
    Dim WindowText As String
    
    Dim RetVal As Long
    
    On Error GoTo Unexer
    
    ' Locate the hwnd for FileZilla Server
    WindowHandlesInfo = GetWindowHandles()
    
    Array1 = Split(WindowHandlesInfo, Chr$(255))
    Ubnd1 = -1
    On Error Resume Next
    Ubnd1 = UBound(Array1)
    On Error GoTo Unexer
    
    For Index1 = 0 To Ubnd1
        Array2 = Split(Array1(Index1), Chr$(254))
        hWnd = Val(Array2(0))
        WindowClass = CStr(Array2(1))
        WindowText = CStr(Array2(2))
        
        If hWnd <> 0 Then
            If WindowClass = "FileZilla Server Helper Window" Then
                Debug_Print "Posting message to " & CStr(hWnd)
                RetVal = PostMessage(hWnd, WM_FILEZILLA_RELOADCONFIG, 0, 0)
                Debug_Print "Posted message to " & CStr(hWnd)
            End If
        End If
    Next Index1
    
    Exit Sub
Unexer:
    Debug.Print "ERROR (FileZillaServerReloadConfig): " & Err.Description
End Sub
by boco
2011-05-18 17:06
Forum: FileZilla Server Support
Topic: New Users - Batch mode
Replies: 1
Views: 1552

Re: New Users - Batch mode

You could directly modify the FileZilla Server.xml file and call FZ Server with the /reload-config switch afterwards. Of course you'd have to write the conversion script yourself.
by manuel0081
2011-04-05 13:56
Forum: FileZilla Server Support
Topic: access is denied
Replies: 1
Views: 1468

access is denied

Hi, i upgrade Filezilla Server to last version (0.9.37)
My .NET web app launch ProcessInfo class with filezilla.exe /reload-config. My web app creates users in filezilla xml file.
After upgrading i have the error Access is denied. The user of the application pool of the web app has full control on Filezilla folder.
Who can help me?
Thanks in advance
by Shawn94
2011-02-09 17:25
Forum: FileZilla Server Support
Topic: /reload-config not working. Must restart service.
Replies: 20
Views: 11035

/reload-config not working. Must restart service.

Hey all,

I have a server running 3 instances of FileZilla Server v 0.9.34. We have a script that adds new users to the FileZilla Server.xml for each of the instances. The script then calls the /reload-config command for the appropriate instances of FileZilla Server.

It appears that /reload-config is not working. Here's what I'm doing to test:

1) I add a user to the FileZilla Server.xml
2) I run the following command manually E:\Program Files (x86)\FileZilla Server2>"FileZilla server.exe" /reload-config
3) I open FileZilla Server admin console and check the Users list. The user I added in step 1 is not listed.
4) Restart the FileZilla Server service.
5) Recheck the Users list and the user I added in step 1 is now listed, and I can login fine.

Any ideas here folks? Any other information that I can provide to "help you help me"?

Thanks in advance!
by davm.dev
2010-12-14 21:18
Forum: FileZilla Server Support
Topic: abort a download
Replies: 4
Views: 1707

abort a download

Hello
I would like to kick a user while is downloading a file from server. My purpose is to abort his download.
I know how to do it using the "FileZilla Server Interface.exe" software.
But how can i do it using the "FileZilla server.exe" software?
I presume that i have to modify a parameter value in the "FileZilla Server.xml" configuration file and call "FileZilla server.exe /reload-config". But which parameter value do i have to change?
Thank for your answer.
by botg
2010-10-14 16:51
Forum: FileZilla Server Support
Topic: Any management mods/addons for Better User/Group Management?
Replies: 1
Views: 1952

Re: Any management mods/addons for Better User/Group Managem

You could directly modify FileZilla Server.xml and afterwards execute "FileZilla Server.exe" /reload-config
by boco
2010-09-10 23:47
Forum: FileZilla Server Support
Topic: Dynamically add users...?
Replies: 6
Views: 3197

Re: Dynamically add users...?

Is there a way to add users dynamically with file permissions?
Edit the FileZilla Server.xml file directly, then call FileZilla Server.exe /reload-config.
Also, can i connect to the admin panel from a different system?
1. Open server settings, Admin interface settings. Note down the admin port, and add the IP of the designated remote-admin PC to the list of allowed IPs. You have to set a password for the server of remote administration will fail!

2. Make sure the admin port is opened in the firewall (it must be forwarded for remote administration over the internet).

3. Run the installer on the second system and install only the admin interface.

4. Use the IP and admin port of the server PC to connect to the remote FTP service.
by botg
2010-07-30 11:11
Forum: FileZilla Server Support
Topic: FTP Server Importing Users
Replies: 3
Views: 1832

Re: FTP Server Importing Users

Yes. Simple edit FileZilla Server.xml and afterwards call "FileZilla Server.exe" /reload-config to reload the file. This does not disrupt active connections and ongoing transfers.
by boco
2010-06-21 21:49
Forum: FileZilla Server Support
Topic: User password change CMD
Replies: 1
Views: 1345

Re: User password change CMD

Locally or remotely? Locally, on the server, edit the .xml file directly (use the MD5 hash of the designated password), then call "FileZilla Server /reload-config" afterward. Remote changing of user passwords is not possible and not covered by FTP.
by zermattchris
2010-05-16 21:00
Forum: FileZilla Server Support
Topic: Java - Groovy exec() not working for /reload-config
Replies: 1
Views: 1416

Java - Groovy exec() not working for /reload-config

Hi 'Zilla gang,

This has been driving me completely batty, and none of the Java/Groovy gurus on the dev list can figure it out either (I've spent days trying to get what I thought was something simple to work! Grrr).

When trying to call the /reload-config command from Groovy (Java) on FileZilla Server it fails, in weird and not so wonderful ways.

I'm getting a return code of '1' for /reload-config (fail)
but...
if I change it to /stop or /start -- all works as it should.

I'm trying to add new user accounts to Server by changing the FileZilla Server.xml file, and then wanted to reload these settings.

Groovy code:

Code: Select all

		def ant = new AntBuilder() 
		ant.exec(	outputproperty:"cmdOut",
		            errorproperty: "cmdErr",
		            resultproperty:"cmdExit",
		            failonerror: "false",
		            dir: "c:\\Program Files\\FileZilla Server",
		            executable: 'cmd.exe' 
				)
				{
					//  /reload-config fails, while /start and /stop work ok
					arg( line: """/c "FileZilla Server.exe" /reload-config""" )
				}
		
		println "return code:	${ant.project.properties.cmdExit}"
		println "stderr:		${ant.project.properties.cmdErr}"
		println "stdout:		${ant.project.properties.cmdOut}"
		
I know this is a long shot, but does anyone have an idea why this is failing? Running from the Windows command line and/or from a bat script works as expected, just not from the Groovy code.

Any flashes of brilliance would be hugely appreciated!

Cheers,
-Chris
by boco
2010-04-21 22:07
Forum: FileZilla Server Support
Topic: Reload-config does not support the change of listening port
Replies: 7
Views: 4914

Re: Reload-config does not support the change of listening port

I have tested it and it seems there's a problem.

1. If changed in the GUI FZ Server correctly starts listening on the new port. Old connections are retained on the old port. Old port is dropped when the last old connection is closed.
2. BUT: If changed directly in the XML and called with /reload-config, FZ Server fails to recognize the new port and does not start listening on it (though it is reflected in the GUI). Only a server restart helps, currently.
by fric
2010-04-21 17:26
Forum: FileZilla Server Support
Topic: Reload-config does not support the change of listening port
Replies: 7
Views: 4914

Reload-config does not support the change of listening port

I am new to FileZilla Server so please apologize if my question is out of subject here.

I would like to write a small Windows script that do the following tasks :
1. change the listening ports in the "FileZilla Server.xml" configuration file
2. execute "FileZilla server.exe" /reload-config to change the port without stopping and running the server

Before coding, I tried to change manually the port in configuration file (say "21" to "1000") and execute /reload-config.
The settings in the administration interface shows the new port number "1000", which is correct, but I cannot connect to the server on this new port.
The server is still listening to the port "21". When I execute netstat -an to see the open ports, I don't see the new port "1000".

If I input the port number "1000" directly into the admin interface, the socket is correctly created and the port "1000" is shown as opened in netstat.

Do you have any idea on that inconsistent behaviour ? Do I have to shutdown and restart the server to change the port ?

Thank you for your help !
Fabien