SFTP Issue: Ignoring Destination Folder? (v5.7.9.6)

Post Reply
roadtoad
Posts: 4
Joined: Sat Aug 26, 2023 8:16 pm

SFTP Issue: Ignoring Destination Folder? (v5.7.9.6)

Post by roadtoad »

Just bought a license last week and installed the most recent version of Blue Iris, 5.7.9.6.

TLDR: I've spent several hours trying to set up a SFTP connection to a Synology NAS, and then an Ubuntu webserver when that failed. It seems the issue is Blue Iris does not use the directory paths specified in setup.

More details: There is a "Base directory" option when setting up the SFTP connection, and a "Folder" path option when setting up the alert action. I have tried multiple things in both places, but files will only upload to the SFTP user's home directory (/home/sftpuser/).

On the Synology NAS and when using a Chroot'ed user on the webserver (followed these instructions: https://www.digitalocean.com/community/ ... untu-20-04) I was getting "SSH_FX_PERMISSION_DENIED" errors when running the setup test. I'm assuming it is because it was not writing to the specified folder the user has permissions to. On the webserver the user is set up (and I have confirmed in Filezilla) to log into the /var/sftp/ path by default. It then needs to write files in the "sftpuser" folder inside that path.

Here is the full log when hitting "Test" on the FTP tab:

Code: Select all

Connecting to 192.168.0.51
Connected
Uploading to /sftpuser/ftptest.txt
Sending
FTP: ChilkatLog:
  UploadFileByName:
    DllDate: Jul 25 2023
    ChilkatVersion: 9.5.0.95
    UnlockPrefix: BLUEIR
    UnlockStatus: 2
    Architecture: Little Endian; 64-bit
    Language: Visual C++ 2019 / x64
    VerboseLogging: 0
    SshVersion: SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.3
    SftpVersion: 3
    uploadFileByName:
      remoteFilePath: ftptest.txt
      localFilePath: C:\PROGRA~3\BLUEIR~1\temp\ftptest.txt
      localFileSize: 20
      sftpOpenFile:
        remotePath: ftptest.txt
        access: writeOnly
        createDisposition: createTruncate
        v3Flags: 0x1a
        Sent FXP_OPEN
        responseMsgType: SSH_FXP_STATUS
        statusResponseFromServer:
          request: FXP_OPEN
          statusCode: SSH_FX_PERMISSION_DENIED
          statusMessage: Permission denied
        --statusResponseFromServer
        retryFilepath: ./ftptest.txt
        remotePath: ./ftptest.txt
        access: writeOnly
        createDisposition: createTrunc (4)
I disabled the Chroot command for the user on the webserver and now it successfully uploads the test file and all alerts, but they will only go to the /home/sftpuser/ directory no matter what I specify in settings.

Attaching screenshots of my FTP and alert settings.
Attachments
bi_sftp_setup2.png
bi_sftp_setup2.png (28.58 KiB) Viewed 6564 times
bi_sftp_setup.png
bi_sftp_setup.png (23.31 KiB) Viewed 6564 times
roadtoad
Posts: 4
Joined: Sat Aug 26, 2023 8:16 pm

Re: SFTP Issue: Ignoring Destination Folder? (v5.7.9.6)

Post by roadtoad »

I tried creating an upload folder inside the user's home: "/home/sftpuser/uploads/" and run the setup test using paths:

"/home/sftpuser/uploads/"
"/sftpuser/uploads/"
"/uploads/"

Tried many variations with and without the leading and trailing backslashes but could not get the test file to go anywhere except "/home/sftpuser/". Interestingly, if I delete the "uploads" folder and run the test it will create the uploads folder, but puts the file in the user's home folder still.

Has anyone successfully set up FTP/SFTP using a non-default path? I can probably use it this way, but would prefer to have a chroot'ed user for security (and to upload to the Synology).
User avatar
TimG
Posts: 2098
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: SFTP Issue: Ignoring Destination Folder? (v5.7.9.6)

Post by TimG »

Sorry, I've not tried this, so I can't help. I posted so you know we are not ignoring you :?
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
IAmATeaf
Posts: 466
Joined: Mon Jun 17, 2019 7:48 pm

SFTP Issue: Ignoring Destination Folder? (v5.7.9.6)

Post by IAmATeaf »

I think you’ll need to log a support ticket, can’t say I’ve ever tried doing this or ever will

I should really qualify what I mean by this. For me my BI PC is part of the security of the house so I prefer to keep the PC as self contained as possible so I personally prefer to have the storage in the PC, some might argue that it might be all my eggs in one basket?

Why do I prefer self contained, quite simply the system isn’t really then dependant on external factors so hopefully the cams will keep recording should for example my home internet dies or my NAS dies.

Obviously not 100% reliable or resilient but providing there is power and my POE is running the cams will hopefully carry on recording.
roadtoad
Posts: 4
Joined: Sat Aug 26, 2023 8:16 pm

Re: SFTP Issue: Ignoring Destination Folder? (v5.7.9.6)

Post by roadtoad »

Going to open a ticket. Thank you for the responses.
hokiefan
Posts: 2
Joined: Fri Sep 29, 2023 2:43 pm

Re: SFTP Issue: Ignoring Destination Folder? (v5.7.9.6)

Post by hokiefan »

Did you ever get a response? I'm having the same issue and sent a support email but haven't heard back.
roadtoad
Posts: 4
Joined: Sat Aug 26, 2023 8:16 pm

Re: SFTP Issue: Ignoring Destination Folder? (v5.7.9.6)

Post by roadtoad »

Yes, Ken actually responded the same day I emailed and said he may have found the issue and would push out a fix in version 5.7.9.7.

Unfortunately, I did not see the email and never tested the fix.

I ended up creating alerts and backups without using SFTP in BI and use a Google Drive sync folder to save alert image backups to the cloud instead.
Post Reply