Filestore FTP settings


(Keith Wessel) #1

I am trying to setup Filestore to backup my FreePBX 15.0. My FreePBX box is setup on an independent LAN network. VPN is setup to another LAN. I setup a Win 10, FTP server on the LAN at the end of the VPN tunnel. I can access the WIN 10 FTP from browsers on both sides of the tunnel.

When I run backup from FreePBX I select the Filestore FTP that I setup to the WIN 10 FTP. I get this error:

Saving to selected Filestore locations
Root is invalid or does not exist: /xxx.xxx.xxx.xxx/
Finished Saving to selected Filestore locations
There were errors during the backup process
ftp_chdir(): The system cannot find the file specified.
Root is invalid or does not exist: /xxx.xxx.xxx.xxx/

Thoughts?


(Kapil Gupta) #2

Looks like some issue in FTP conection.

I would suggest you manually confirm the connectivity to FTP server from Freepbx system.

  1. login to freepbx server and then switch to asterisk user
  2. ftp and then provides user and password as you configured in Filestore
  3. confirm you are able to login properly and then try to change the directory to the path as specified in Filestore
    Ref to https://www.howtoforge.com/tutorial/how-to-use-ftp-on-the-linux-shell/ to know ftp linux commands.

If all above commands works fine then ideally backup also should work fine. Please give try , it might help to figure out the problem.

thanks


(Keith Wessel) #3

Thanks for this suggestion. I was able to logon to the WIN 10 ftp server from the FreePbx shell. I have tried a few alternative ways to enter the ftp details in the GUI. Here is what that looks like:


(Keith Wessel) #5

I’m not sure what you mean by “switch to asterisk user.”


(Kapil Gupta) #6

FTP instructions i pasted is to execute from Freepbx linux server not from asterisk cli. Refer to web url i posted to see how you can execute linux cli command.

switch to asterisk user means - generally you log in to freepbx linux system as root so need to switch to “asterisk” user by running “su asterisk” command.

with gui settings , its hard to tell what could be wrong, as original backup error mentioned its failed to change directory so i am sure its something to do with FTP server permission only.


(Keith Wessel) #8

If I go to the shell, type su asterisk and then logon to the ftp server, this is what I see:

This is exactly the same if I login from the root directory.


(Kapil Gupta) #12

your screenshot didnt mentioned “ftp server-ip” so you really have to follow https://www.howtoforge.com/tutorial/how-to-use-ftp-on-the-linux-shell/ guide to try ftp commands locally and try to change directory to your filestore configured path to confirm that works fine.

using asterisk user is needed because freepbx runs as asterisk user not as root so better to switch to “asterisk” user and then execute all FTP commands.

Thanks.


(Keith Wessel) #13

I am able to logon to the ftp server from the freepbx shell. I again typed su asterisk. Then ftp ip address. I am able to change directories and us the ls command to list files. Everything works find from the shell.


(Keith Wessel) #14

image


(Keith Wessel) #15

image

I am able to get and put from ftp as asterisk user between the FreePBX box and the WIN 10 FTP server.


#16

Did you at any time need to type anything to access the ftp service as the asterisk user ? if you did , then did the FreePBX user type exactly the same thing automatically?


(Keith Wessel) #17

I type ftp ip address then, user name and password and ftp works from the shell as asterisk user. I get the same result if I type ftp ip address for the root or su asterisk


(Keith Wessel) #18

I continue to get this error message if I run backup from the FreePBX gui

Saving to selected Filestore locations
Root is invalid or does not exist: /172.16.10.110/
Finished Saving to selected Filestore locations
There were errors during the backup process
ftp_chdir(): The system cannot find the file specified.
Root is invalid or does not exist: /172.16.10.110/


#19

Then the ‘backup service’ will need to be provisioned to provide exactly the same ‘typing’

ftp is a pig to script, M$ an even bigger Pig. choose a better transport if you can


(Keith Wessel) #20

the only typing difference between my entry in Filestore vs the shell is I enter ftp before the ip address. I believe I tried typing ftp in Filestore. I will try that again.


#21

Windows now has an available linux subsystem, my guess that will be way easier to use and you can ssh it.


#23

there you go, your windoze machine wont accept your connection on port 21


(Keith Wessel) #24

With these settings

This result

Saving to selected Filestore locations
Root is invalid or does not exist: /172.16.10.110/
Finished Saving to selected Filestore locations
There were errors during the backup process
ftp_chdir(): The system cannot find the file specified.
Root is invalid or does not exist: /172.16.10.110/


#25

it is highly unlikely that you have a path named that on any ftp server, try something simple like freepbx or leave it blank, , (no / in windoze, they get everything backwards :slight_smile: )


#27

ok, the path needs to start (weirdly ) with / but . means very different things to linux and m$ try /blah or just /