YunoHost-Apps / calckey_ynh

Calcket package for YunoHost
https://i.calckey.cloud/
GNU Affero General Public License v3.0
9 stars 7 forks source link

EACESS issue when restoring Calckey #44

Closed lapineige closed 11 months ago

lapineige commented 1 year ago

I'm trying to restore a Calckey backup (from v13.x). It fails with this error:

DEBUG sudo -u calckey env PATH=/opt/node_n/n/versions/node/19/bin:/opt/node_n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/
sbin:/bin pnpm install                                                                                                                                                                                                      
DEBUG Internal Error: EACCES: permission denied, mkdir '/var/www/calckey/.cache/node/corepack'                                                                                                                       
DEBUG Error: EACCES: permission denied, mkdir '/var/www/calckey/.cache/node/corepack'

I tried to remove the .cache folder from the backup archive, but no luck. I guess it's because that pnpm install command (https://github.com/YunoHost-Apps/calckey_ynh/blob/master/scripts/restore#L44) try to create the folder ?

ping @thatonecalculator, in case you have some clue 😅

ThatOneCalculator commented 1 year ago

This seems like a YunoHost specific issue

lapineige commented 1 year ago

(wow that was fast 😅) Indeed. Do you know if that pnpm install command creates the corepack cache folder ?

lapineige commented 1 year ago

I don't understand why there is an error even when I removed the folder from the backup archive. Why would it try to create such a folder ?

ThatOneCalculator commented 1 year ago

@oufmilo

lapineige commented 11 months ago

Fixed by #47 ! :tada:

I don't understand the issue, but it worked :smiley:

Note for other affected by this : you need to manually edit the restore file in your backup, because that's the one used, not the latest version from master.