YunoHost-Apps / borgwarehouse_ynh

BorgWarHouse package for YunoHost
https://borgwarehouse.com/
GNU General Public License v3.0
1 stars 1 forks source link

Repository setting not functional #10

Closed stilobique closed 1 month ago

stilobique commented 3 months ago

Hello, I try this application, no issue to install the app. However, I can't add a new repository with the setting ; this message is return.

An error has occurred : /home/borgwarehouse/.ssh/authorized_keys must be present

Tested with my raspberry server (only for a testing) and on another server.

The log application

Mar 19 11:20:28 npm[10834]: Error: Command failed: /var/www/borgwarehouse/app/helpers/shells/createRepo.sh "ssh-ed25519 key xx@xx.zz" 200
Mar 19 11:20:28 npm[10834]: grep: /home/borgwarehouse/.ssh/authorized_keys: No such file or directory
Mar 19 11:20:28 npm[10834]:     at ChildProcess.exithandler (node:child_process:422:12)
Mar 19 11:20:28 npm[10834]:     at ChildProcess.emit (node:events:517:28)
Mar 19 11:20:28 npm[10834]:     at maybeClose (node:internal/child_process:1098:16)
Mar 19 11:20:28 npm[10834]:     at Socket.<anonymous> (node:internal/child_process:450:11)
Mar 19 11:20:28 npm[10834]:     at Socket.emit (node:events:517:28)
Mar 19 11:20:28 npm[10834]:     at Pipe.<anonymous> (node:net:350:12) {
Mar 19 11:20:28 npm[10834]:   code: 5,
Mar 19 11:20:28 npm[10834]:   killed: false,
Mar 19 11:20:28 npm[10834]:   signal: null,
Mar 19 11:20:28 npm[10834]:   cmd: '/var/www/borgwarehouse/app/helpers/shells/createRepo.sh "ssh-ed25519 key xx@xx.zz" 200',
Mar 19 11:20:28 npm[10834]:   stdout: '/home/borgwarehouse/.ssh/authorized_keys must be present',
Mar 19 11:20:28 npm[10834]:   stderr: 'grep: /home/borgwarehouse/.ssh/authorized_keys: No such file or directory\n'
Mar 19 11:20:28 npm[10834]: }

I can try to make a new PR with this fix, but the path used need to be inside the yunohost.app maybe ?

PS: Another strange issue, with my raspberry test server, the yunohost.app folder have this user:group setup

drwxr-x--- 3 borgwarehouse www-data      4096 Aug 24  2023 funkwhale
drwxr-x--- 3           996 www-data      4096 Aug 24  2023 funkwhale__2
drwxr-x--- 4 borgwarehouse borgwarehouse 4096 Sep 17  2023 pinry
silverhook commented 3 months ago

Hi @stilobique , there is a PR that got close to it, but not entirely yet.

Perhaps check out https://github.com/YunoHost-Apps/borgwarehouse_ynh/pull/2 and see if that helps you fix it.

That said, currently the package is without a maintainer and there’s just two noobies (me and another brave soul) who are thinking of picking up the mantle, but speaking just for myself, I still need to go through the packaging documentation.

If you’re up for it, it’d be great if you’d help getting this package up to a running state :)

Limezy commented 2 months ago

It took me a shitload of time, but I have finally understood that the problems were coming from the hardening of the service that was preventing the shell scripts from executing properly... I'll finalise an up to date and working PR

Limezy commented 2 months ago

Great, I've been given the rights over this repo, so I'll even be able to merge it right away

Limezy commented 2 months ago

Was this app working at some point in history, or never ? By working, I mean really working for managing a backup repo ? I'm struggling much more than I expected !

silverhook commented 1 month ago

Good question. I don’t remember anyone saying they had actually managed to use it on YunoHost yet.