Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Import older backups #4265

Open
jaapmarcus opened this issue Jan 26, 2024 · 7 comments
Open

[Bug] Import older backups #4265

jaapmarcus opened this issue Jan 26, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@jaapmarcus
Copy link
Member

jaapmarcus commented Jan 26, 2024

### Describe the bug

#   -- WEB --
#   2024-01-26 07:28:34 vesta09823.tld
#   chown: invalid group: ‘testbk-5285_ftp1:testbk-5285_ftp1’

Need to check what goes wrong maybe we need alter the restore process for older backups

Tell us how to replicate the bug

Check Drone:

https://drone.hestiacp.com/hestiacp/hestiacp/4035/1/6

Which components are affected by this bug?

Control Panel Command Line Interface

Hestia Control Panel Version

1.9.x

Operating system

N/A

Log capture

# -- command failed --
# status : 12
# output (22 lines):
#   2024-01-26 07:27:34 Load Average 1
#   
#   -- WEB --
#   2024-01-26 07:28:34 vesta09823.tld
#   chown: invalid group: ‘testbk-5285_ftp1:testbk-5285_ftp1’
@jaapmarcus jaapmarcus added the bug Something isn't working label Jan 26, 2024
@Skamasle
Copy link
Contributor

There is any "old" backup for test ?

Its a vesta backup ?

@jaapmarcus
Copy link
Member Author

jaapmarcus commented Jan 28, 2024

local archive_name="vesta09823.2018-10-18"

  • next line

@jaapmarcus
Copy link
Member Author

@Skamasle
Copy link
Contributor

Skamasle commented Feb 6, 2024

That file restored fine in 1.8.x

And drone say just fail in ubuntu ? :S

@jaapmarcus
Copy link
Member Author

That file restored fine in 1.8.x

And drone say just fail in ubuntu ? :S

Drone tests again 1.9 ...

@Skamasle
Copy link
Contributor

Skamasle commented Feb 10, 2024

I investigate this, and this not is a v-restore-user problem this is a add_chroot_jail function problem

The error comes from

https://github.com/hestiacp/hestiacp/blob/cabea6a621a3fa663b1f822f25fa281129348c73/func/main.sh#L1785C27-L1785C28

v-restore-user call rebuild_web_domain_conf 2 times

When rebuild first time the FTP user not exists, this rebuild create the user, so second time not get any error

So you can reproduce this error when add ftp account:

v-add-web-domain-ftp admin hestia.test.net  test  password
chown: invalid group: 'admin_test:admin_test'

@Skamasle
Copy link
Contributor

Skamasle commented Feb 10, 2024

Posible solution for this:
Change
$BIN/v-add-user-sftp-jail "$ftp_user"

for

$BIN/v-add-user-sftp-jail "$user"
in

$BIN/v-add-user-sftp-jail "$ftp_user"

FTP user not have group, and have same GID/UID than original user, so I think can be valid and safe.

THis solve backup problem and v-add-web-domain-ftp, issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants