cloudpanel-io / cloudpanel-ce

1.21k stars 99 forks source link

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

Open hsmeets opened 1 month ago

hsmeets commented 1 month ago

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

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