cloudpanel-io/cloudpanel-ce

[Backup] Leading slash (/) added to SFTP Remote Server Path

hsmeets opened this issue · 0 comments

CloudPanel version(s) affected

2.4.2

Description

When configuring SFTP Backups for Rsync.net storage, I have to specify the Remote Server Path without a leading slash (/), to prevent targeting the file system root (keep the path relative to the user home folder).

However, backups are not working and the notifications suggest that CloudPanel is adding a leading slash to the path, which was not submitted in the settings form.

How to reproduce

  • Configure Remote Backup with SFTP
  • Enter "Remote Server Path" without a leading slash (for example: "test" or "test/"
  • Command is filled with remote path WITH a leading slash, which is not supported by rsync.net: "/test" or "/test/"

Possible Solution

No response

Additional Context

Command " : /usr/bin/sudo /usr/bin/rclone -v copy '/home/test/tmp/backup.tar' remote:'/test/2024-08-05/01.09/home/test/' --config='/root/.config/rclone/rclone.conf'" failed, error message: 2024/08/05 01:09:13 ERROR : backup.tar: Failed to copy: Put mkParentDir failed: mkdir "/test" failed: permission denied 2024/08/05 01:09:13 ERROR : Attempt 1/3 failed with 1 errors and: Put mkParentDir failed: mkdir "/test" failed: permission denied 2024/08/05 01:09:13 ERROR : backup.tar: Failed to copy: Put mkParentDir failed: mkdir "/test" failed: permission denied 2024/08/05 01:09:13 ERROR : Attempt 2/3 failed with 1 errors and: Put mkParentDir failed: mkdir "/test" failed: permission denied 2024/08/05 01:09:13 ERROR : backup.tar: Failed to copy: Put mkParentDir failed: mkdir "/test" failed: permission denied 2024/08/05 01:09:13 ERROR : Attempt 3/3 failed with 1 errors and: Put mkParentDir failed: mkdir "/test" failed: permission denied 2024/08/05 01:09:13 INFO : Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA - Errors: 1 (retrying may help) Elapsed time: 0.9s 2024/08/05 01:09:13 Failed to copy: Put mkParentDir failed: mkdir "/test" failed: permission denied