It is currently Sat Oct 16, 2021 8:44 am
All times are UTC + 8 hours

SFTP share created file size zero

SFTP share created file size zero

Postby Norbyte » Thu Sep 16, 2021 11:03 pm

Hi,

I've used SFTP for camera recordings since Surveillance Center doesn't supports fully my FosCam cameras.
So, it worked without issue (except you know the storage management which must be done manually).

Few weeks ago I've discovered all the recorded events created a zero file. Contained nothing.
Camera restart, checking of the settings lead nowhere, then I've tested the user/password access from the camera side to the SFTP share and it cailed even with updated credentials.

Then I changed from SFTP to FTP and the result was the same. Zero files. Then started to enable functions above the standard settings in FTP Advanced tab, like SSL/TLS - nothing.
Then FXP which as a miracle worked. I'm not really familiar why and how and again why, but not all went back to normal.

And all of these were because of teh latest non-beta ADM.

No questions, just shared experiences.

Oh, and increased failes logon attempts in the log on SFTP service, which I disabled now as not in used anymore.
User avatar
Norbyte
 
Posts: 26
Joined: Fri Jul 21, 2017 8:18 pm
Location: Hungary

Re: SFTP share created file size zero

Postby Nazar78 » Fri Sep 17, 2021 3:11 am

Thanks for sharing. I'm not using the Surveillance Center either even it has support for my cams because I need few customizations with less resources. For me I wrote a simple ffmpeg script to RTSP capture, monitor (in case the cams goes down) and housekeep for a month. Used to run it on the NAS but I've moved it to my router since it's using very little CPU (2-5% each cam H.265 1520p) and because I don't want to keep the hdds awaked.

For storage management you could do something like this, snippet taken from a part of my script. You can convert it into a script then schedule in the cron to run every midnight.

Code: Select all
CCTV=/foo/bar # Path to the media. Mine was auto created every 15 mins with /some-paths/Surveillance/cctv-ip/yyyy/mm/dd/cctv-yyyymmdd-hhmmss.mp4
ARCHIVE=31 # Number of days to keep
NEXT="`date --date="next day" +%Y/%m/%d`" # Path to the next day to exclude archiving. Mine the path is pre-created before the next day ../yyyy/mm/dd

echo -n "Archiving CCTV after $ARCHIVE days..."
find $CCTV/* ! -wholename "*$NEXT" -a \( -mtime +$ARCHIVE -o -empty \) -delete>/dev/null 2>&1
echo "OK!"

The above means find and remove the files and/or folders that's path not named as the next day and last modified over 31 days or is empty. Replace "-delete>/dev/null 2>&1" with "-ls" when you're testing to prevent accidental removal of data.
AS5304T - 16GB DDR4 - [40TB N300 RAID10 + 5 Bay USB: 8TB RAID5 & 480GB SSD for Apps]
User avatar
Nazar78
 
Posts: 489
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore

Re: SFTP share created file size zero

Postby ndl101 » Sat Sep 18, 2021 2:03 pm

Does sound like a bug. I suggest reporting it to Asustor via the support system.

I made it long as I lacked the time to make it short.

---
Help to self-help:
How to ask (good) questions in a forum
---
General information
Location: Denmark
OS: Ubuntu 20.04
NAS: Lockerstor 4 (AS6604T)
ndl101
 
Posts: 41
Joined: Sun Jul 11, 2021 4:32 pm

Re: SFTP share created file size zero

Postby Norbyte » Tue Sep 21, 2021 7:03 pm

ndl101 wrote:Does sound like a bug. I suggest reporting it to Asustor via the support system.


Ticket posted (#43155), but I don't know will it has effect or not.
User avatar
Norbyte
 
Posts: 26
Joined: Fri Jul 21, 2017 8:18 pm
Location: Hungary

Return to [Official] For AS61XX/62XX Series

  • You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum
  • Who is online

    Users browsing this forum: No registered users and 1 guest