Closed stemy2 closed 3 years ago
I'm experiencing the same issue after upgrading to 3.1. Another instance on older version works fine.
The issue is still there even on a fresh install of 3.1
The upgrade didn't solved anything for me, i'm still having a "bad request" when attempting to install a plugin.
can we re-open this issue? i'm also still having the "Bad Request"
EDIT: Problem seems to be in /home/yunohost.app/peertube/storage/plugins/node_modules/ the .bin/marked
folder and file with root permissions. I removed them and now everything seems to work fine.
Short info on how to do a manual plugin installation to see the error messages:
cd /var/www/peertube
sudo -u peertube NODE_CONFIG_DIR="/var/www/peertube/config" NODE_ENV=production npm run plugin:install -- --npm-name peertube-plugin-creative-commons
@h3ndrik could you please explain what you mean by
_Problem seems to be in /home/yunohost.app/peertube/storage/plugins/nodemodules/ the .bin/marked folder and file with root permissions. I removed them and now everything seems to work fine.
which folders and files die you remove? node_modules ? Where do i find .bin/marked ? thanks
@rocky-III
Where do i find .bin/marked ?
The folder .bin
is only visible and accessable with root (sudo su
), but not with yunohost admin.
content of .bin
folder:
/home/yunohost.app/peertube/storage/plugins/node_modules/.bin# ll
total 8
4 drwxr-xr-x 2 root root 4096 Jun 12 14:48 .
4 drwxr-x--- 30 peertube www-data 4096 Jun 12 16:06 ..
0 lrwxrwxrwx 1 root root 20 Jun 12 14:48 marked -> ../marked/bin/marked
0 lrwxrwxrwx 1 root root 31 Jun 12 14:48 mediainfo.js -> ../mediainfo.js/examples/cli.js
Intererestingly after
-> changing permission of .bin
chown -R peertube:www-data .bin/
-> and trying to install a design in web surface the .bin
folder is gone:
/home/yunohost.app/peertube/storage/plugins/node_modules# ll
total 108
4 drwxr-x--- 27 peertube www-data 4096 Jun 12 16:28 .
4 drwxr-x--- 4 peertube www-data 4096 Jun 12 16:05 ..
4 drwxr-x--- 2 peertube www-data 4096 Jun 12 16:05 abstract-logging
4 drwxr-x--- 3 peertube www-data 4096 Jun 12 16:05 asn1
4 drwxr-x--- 2 peertube www-data 4096 Jun 12 16:05 assert-plus
4 drwxr-x--- 4 peertube www-data 4096 Jun 12 16:05 backoff
4 drwxr-x--- 9 peertube www-data 4096 Jun 12 16:05 bcryptjs
4 drwxr-x--- 3 peertube www-data 4096 Jun 12 16:05 core-util-is
4 drwxr-x--- 4 peertube www-data 4096 Jun 12 16:05 extsprintf
4 drwxr-x--- 3 peertube www-data 4096 Jun 12 16:05 ldapauth-fork
4 drwxr-x--- 3 peertube www-data 4096 Jun 12 16:05 ldap-filter
4 drwxr-x--- 9 peertube www-data 4096 Jun 12 16:05 ldapjs
4 drwxr-x--- 2 peertube www-data 4096 Jun 12 16:05 lru-cache
4 drwxr-x--- 6 peertube www-data 4096 Jun 12 16:05 marked
4 drwxr-x--- 4 peertube www-data 4096 Jun 12 16:05 mediainfo.js
4 drwxr-x--- 2 peertube www-data 4096 Jun 12 16:05 once
4 drwxr-x--- 2 peertube www-data 4096 Jun 12 16:05 peertube-plugin-auth-ldap
4 drwxr-xr-x 8 peertube peertube 4096 Jun 12 16:28 peertube-plugin-topmenu
4 drwxr-x--- 10 peertube www-data 4096 Jun 12 16:05 peertube-plugin-upload-limits
4 drwxr-x--- 6 peertube www-data 4096 Jun 12 16:05 peertube-theme-bittube-light-mode
4 drwxr-x--- 3 peertube www-data 4096 Jun 12 16:05 precond
4 drwxr-x--- 2 peertube www-data 4096 Jun 12 16:05 safer-buffer
4 drwxr-x--- 4 peertube www-data 4096 Apr 2 09:04 @types
4 drwxr-x--- 5 peertube www-data 4096 Jun 12 16:05 vasync
4 drwxr-x--- 3 peertube www-data 4096 Jun 12 16:05 verror
4 drwxr-x--- 2 peertube www-data 4096 Jun 12 16:05 wrappy
4 drwxr-x--- 2 peertube www-data 4096 Jun 12 16:05 yallist
if i´m logged in by ftp as root I can´t find .bin/
I can not install a plugin even via ssh/cli:
/var/www/peertube# sudo -u peertube NODE_CONFIG_DIR="/var/www/peertube/config" NODE_ENV=production npm run plugin:install -- --npm-name peertube-plugin-topmenu
> peertube@3.2.1 plugin:install /var/www/peertube
> node ./dist/scripts/plugin/install.js "--npm-name" "peertube-plugin-topmenu"
[daschauher.aksel.rocks:443] 2021-06-13 07:45:27.804 info: Installing plugin peertube-plugin-topmenu.
[daschauher.aksel.rocks:443] 2021-06-13 07:45:29.310 info: Successful installation of plugin peertube-plugin-topmenu.
[daschauher.aksel.rocks:443] 2021-06-13 07:45:29.311 info: Registering plugin or theme peertube-plugin-topmenu.
[Error: EACCES: permission denied, mkdir '/home/yunohost.app/peertube/storage/plugins/data/peertube-plugin-topmenu'] {
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/home/yunohost.app/peertube/storage/plugins/data/peertube-plugin-topmenu'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 255
npm ERR! peertube@3.2.1 plugin:install: `node ./dist/scripts/plugin/install.js "--npm-name" "peertube-plugin-topmenu"`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the peertube@3.2.1 plugin:install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /var/www/peertube/.npm/_logs/2021-06-13T05_45_29_368Z-debug.log
seems to be a folder permission issue.
The problem is still there.
Works in my instance, but had again #223 issue (solution see there).
Issue is here again after upgrade to peertube 3.2.1~ynh3.
After trying to install a plugin (peertube-plugin-livechat) some permissions changes to peertube:peertube
PLUS the .bin
folder is here again.
/home/yunohost.app/peertube/storage/plugins/node_modules# ll
total 220
4 drwxr-x--- 55 peertube www-data 4096 Jun 19 20:29 .
4 drwxr-x--- 4 peertube www-data 4096 Jun 12 16:05 ..
4 drwxr-x--- 2 peertube www-data 4096 Jun 19 20:29 abstract-logging
4 drwxr-x--- 3 peertube www-data 4096 Jun 19 20:29 asn1
4 drwxr-x--- 2 peertube www-data 4096 Jun 19 20:29 assert-plus
4 drwxr-xr-x 4 peertube peertube 4096 Jun 19 20:29 async
4 drwxr-x--- 4 peertube www-data 4096 Jun 19 20:29 backoff
4 drwxr-x--- 9 peertube www-data 4096 Jun 19 20:29 bcryptjs
4 drwxr-xr-x 2 root root 4096 Jun 19 19:03 .bin
4 drwxr-xr-x 3 peertube peertube 4096 Jun 19 20:29 body-parser
4 drwxr-xr-x 2 peertube peertube 4096 Jun 19 20:29 bytes
4 drwxr-xr-x 2 peertube peertube 4096 Jun 19 20:29 callsite
4 drwxr-xr-x 2 peertube peertube 4096 Jun 19 20:29 content-type
4 drwxr-x--- 3 peertube www-data 4096 Jun 19 20:29 core-util-is
4 drwxr-xr-x 3 peertube peertube 4096 Jun 19 20:29 debug
4 drwxr-xr-x 4 peertube peertube 4096 Jun 19 20:29 decache
4 drwxr-xr-x 3 peertube peertube 4096 Jun 19 20:29 depd
4 drwxr-xr-x 2 peertube peertube 4096 Jun 19 20:29 ee-first
4 drwxr-xr-x 4 peertube peertube 4096 Jun 19 20:29 es6-promise
4 drwxr-xr-x 7 peertube peertube 4096 Jun 19 20:29 express-http-proxy
4 drwxr-x--- 4 peertube www-data 4096 Jun 19 20:29 extsprintf
4 drwxr-xr-x 2 peertube peertube 4096 Jun 19 20:29 http-errors
4 drwxr-xr-x 4 peertube peertube 4096 Jun 19 20:29 iconv-lite
4 drwxr-xr-x 2 peertube peertube 4096 Jun 19 20:29 inherits
4 drwxr-x--- 3 peertube www-data 4096 Jun 19 20:29 ldapauth-fork
4 drwxr-x--- 3 peertube www-data 4096 Jun 19 20:29 ldap-filter
4 drwxr-x--- 9 peertube www-data 4096 Jun 19 20:29 ldapjs
4 drwxr-xr-x 4 peertube peertube 4096 Jun 19 20:29 log-rotate
4 drwxr-x--- 2 peertube www-data 4096 Jun 19 20:29 lru-cache
4 drwxr-x--- 6 peertube www-data 4096 Jun 19 20:29 marked
4 drwxr-x--- 4 peertube www-data 4096 Jun 19 20:29 mediainfo.js
4 drwxr-xr-x 2 peertube peertube 4096 Jun 19 20:29 media-typer
4 drwxr-xr-x 2 peertube peertube 4096 Jun 19 20:29 mime-db
4 drwxr-xr-x 2 peertube peertube 4096 Jun 19 20:29 mime-types
4 drwxr-xr-x 2 peertube peertube 4096 Jun 19 20:29 ms
4 drwxr-x--- 2 peertube www-data 4096 Jun 19 20:29 once
4 drwxr-xr-x 2 peertube peertube 4096 Jun 19 20:29 on-finished
4 drwxr-x--- 2 peertube www-data 4096 Jun 19 20:29 peertube-plugin-auth-ldap
4 drwxr-xr-x 14 peertube peertube 4096 Jun 19 20:29 peertube-plugin-livechat
4 drwxr-x--- 10 peertube www-data 4096 Jun 19 20:29 peertube-plugin-upload-limits
4 drwxr-x--- 6 peertube www-data 4096 Jun 19 20:29 peertube-theme-bittube-light-mode
4 drwxr-x--- 3 peertube www-data 4096 Jun 19 20:29 precond
4 drwxr-xr-x 5 peertube peertube 4096 Jun 19 20:29 qs
4 drwxr-xr-x 2 peertube peertube 4096 Jun 19 20:29 raw-body
4 drwxr-x--- 2 peertube www-data 4096 Jun 19 20:29 safer-buffer
4 drwxr-xr-x 3 peertube peertube 4096 Jun 19 20:29 setprototypeof
4 drwxr-xr-x 2 peertube peertube 4096 Jun 19 20:29 statuses
4 drwxr-xr-x 2 peertube peertube 4096 Jun 19 20:29 toidentifier
4 drwxr-xr-x 2 peertube peertube 4096 Jun 19 20:29 type-is
4 drwxr-x--- 4 peertube www-data 4096 Apr 2 09:04 @types
4 drwxr-xr-x 2 peertube peertube 4096 Jun 19 20:29 unpipe
4 drwxr-x--- 5 peertube www-data 4096 Jun 19 20:29 vasync
4 drwxr-x--- 3 peertube www-data 4096 Jun 19 20:29 verror
4 drwxr-x--- 2 peertube www-data 4096 Jun 19 20:29 wrappy
4 drwxr-x--- 2 peertube www-data 4096 Jun 19 20:29 yallist
Which user is used to install a plugin??
Describe the bug
I get a "bad request" when trying to install any plugin. I reported the problem to the peertube dev, who suggested to report it here since it's ynh specific.
Context
Steps to reproduce
Logs
Error: Command failed: yarn add peertube-plugin-background-play\nwarning package.json: No license field\nwarning No license field\nerror An unexpected error occurred: \"EACCES: permission denied, unlink '/home/yunohost.app/peertube/storage/plugins/node_modules/@types/ldapjs/LICENSE