Presence FTP upload failure

Tips, tricks and frequently asked questions
Post Reply
philippelt
Posts: 10
Joined: 21 Jan 2013, 14:23

Presence FTP upload failure

Post by philippelt »

I own 3 Presence cameras that no longer update video to FTP server for months.

I assume the connexion to FTP server is fine since they continue to create Year / Month / Day folders subtree when there is an event that should be recordedech but there are no video files in these folders.

From the server log (pureftpd), I can see that the cam log properly on the FTP service but then there are failure messages :
```
2023-01-09 11:33:48 xxx pure-ftpd: info (?@a.b.c.d) [INFO] New connection from a.b.c.d
2023-01-09 11:33:48 xxx pure-ftpd: info (?@a.b.c.d) [INFO] netatmo is now logged in
2023-01-09 11:33:48 xxx pure-ftpd: info (netatmo@a.b.c.d) [INFO] Can't change directory to 2023: No such file or directory
2023-01-09 11:33:49 xxx pure-ftpd: info (netatmo@a.b.c.d) [INFO] Can't change directory to 01: No such file or directory
2023-01-09 11:33:49 xxx pure-ftpd: info (netatmo@a.b.c.d) [INFO] Can't change directory to 09: No such file or directory
2023-01-09 11:33:49 xxx pure-ftpd: info (netatmo@a.b.c.d) [INFO] Logout.
```
Unfortunately, the presenceX/2023/01/09 folder tree exists (and has been created by the cam with the appropriate ownership).
If I access the service using lftp, I have no problem to navigate the folder tree and even upload files in it.

When I try to renter password (I found no other way to check connectivity from the camera), using FTP advanced setup in camera settings, I get an answer : Failure (Password required 230 OK) despite the fact that the camera is obviously connecting without problems. I tested removing the 09 (day folder) before retrying change password, the folder was recreated by the camera when I retried Changed password despite the failure password message.

As there is absolutely no way to diagnose anything with netatmo products, I don't see what I can do to solve the issue.

I let the problem stay for months without noticing (real security issues are not so frequent) and now that I would have a serious need of a record of a specific event, i realized that I don't have anything.
orpjb
Posts: 17
Joined: 14 Jan 2022, 10:51

Re: Presence FTP upload failure

Post by orpjb »

Netatmo cameras only use passive mode FTP.

In this mode the camera makes two connections to the server; the first is the command channel on port 21 - this channel is used for commands like 'create folder', 'list files', 'delete file' and so on, when it comes time to transfer file contents, another connection is opened from the camera to a port opened by the server, randomly chosen within a port range; the contents of the file pass through this connection, leaving the command channel open for related commands, like 'abort that transfer'.

When you set up ftp, the netatmo camera does a few checks, it will connect to the server on port 21, log in, cd into its root folder, test that it can create folders and test that it can transfer a test file.
Those tests will fail if the password is incorrect, or the root folder is not present and readable, or the root folder is not writeable by the user, or the test file cannot be written.

I'm not concerned about the logged errors like "Can't change directory to 2023: No such file or directory" because the camera is most likely creating the directories when this command fails.
Ie. camera tries to cd into '2023' > doesn't work > create folder '2023' > cd into folder '2023'...

Since we think login and permissions are correct because folders are getting created in the correct place, this suggests that the file transfer isn't connecting on the additional port.

1) Check your FTP server supports passive mode and has passive mode enabled, find out your passive mode port range.
2) Check your server firewall has open ports for your passive FTP port range as well as port 21.
3) If there's a firewall or router between your camera and server, check that it also has open ports for your passive FTP port range.

* If your firewall rules specify a source IP address, check that your camera has the correct IP and always will have.
Schaferj
Posts: 2
Joined: 21 Mar 2023, 14:35

Re: Presence FTP upload failure

Post by Schaferj »

All My cameras create the test file and then fault with message internal error try again later.
Followed all the suggestions in the forums.
What am i missing.
Schaferj
Posts: 2
Joined: 21 Mar 2023, 14:35

Re: Presence FTP upload failure

Post by Schaferj »

Schaferj wrote: 30 Mar 2023, 17:04 All My cameras create the test file and then fault with message internal error try again later.
Followed all the suggestions in the forums.
I am using a netgear r6350 with ready-share nas, what am i missing.
orpjb
Posts: 17
Joined: 14 Jan 2022, 10:51

Re: Presence FTP upload failure

Post by orpjb »

Does your FTP server allow the user to delete files?
The FTP testing process includes creating and deleting a test file; if that fails you might get an error.
Post Reply

Return to “General questions”