Hardware: VPS bought online YunoHost version: 11.2.21.2 (stable). I have access to my server : through the webadmin Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : yes If yes, please explain:
Not exactly yunohost but I have AMP panel by Cubecoders installed at the same time one the same VPS
Description of my issue
After restarting my vps, 2 of my applications stopped working(n8n and zipline) for no reason. When i try to go their page, it just sends me back to webadmin. I reinstalled zipline and it works fine, but I don’t want to reinstall n8n, because im scared ill lose my files. When I try too boot up n8n it can’t. Here are logs from n8n: https://paste.yunohost.org/onulesecaf
Failed to locate executable /var/www/n8n/node_modules/n8n/bin/n8n: Permission denied
mokay so let’s check if it exists with sudo ls -l /var/www/n8n/node_modules/n8n/bin/n8n and what are the permissions with sudo namei -l /var/www/n8n/node_modules/n8n/bin/n8n
Mokay, it really look like someone or something ran a recursive chown -R www-data on the entire /var/www/ directory … does that mean anything to you or …?
Yes and no … you can’t just “undo” the operation because each file/folder could have specific ownership and not just www-data, and there’s no simple way apriori to know what what the owner of each file or directory …
However, in the current case each /var/www/$app is often owned by $app (recursively I suppose)
So for n8n maybe running sudo chown -R n8n /var/www/n8n and restarting the corresponding service with systemctl restart n8n can fix the issue and maybe similar stuff for other apps
But yeah, running a chown recursively on the entire /var/www clearly ain’t a good idea
Ah yes I see, you also need to chmod +x /var/www/n8n/node_modules/n8n/bin/n8n … which tends to say that you also ran a recursive chmod in addition to the chown … which is less straightforward to fix than the ownership … but at least for this specific case the chmod +x on n8n might unlock this specific situation …