Open mm10079 opened 1 year ago
Can you use server console after running synctube?
If you run node build/server.js
in synctube folder, synctube should start, and you will see synctube cli, where you can send any text to see list of server commands. If you run here /addAdmin Name password
, then it should add admin to user/users.json
Add Admin successful,but still appear Access Error on the webUI.
maybe I should change or should not change something in config.json
You probably trying to make action that is out of your user group permissions (I will make errors more verbose). Is this error happens when you trying to write to chat or something else? You can send me your user/config.json, so i will try to reproduce this problem and say whats wrong here.
I'm trying to make the administrator the only one who has permission to control video playback and add videos
So I removed the rest of the privileges for normal users, like in config.json
I don't understand how to divide the privileges of administrators and general users
Maybe remove the guest's permissions is a mistake
You need to move guest
privileges to level up, so they will be available for admin
, for example:
"permissions": {
"banned": [],
"guest": ["writeChat"],
"user": ["guest"],
"leader": ["user"],
"admin": ["user", "addVideo", "removeVideo", "changeOrder", "toggleItemType", "requestLeader", "rewind", "clearChat", "setLeader", "lockPlaylist", "banClient"]
},
So in this case you should not get Access error
when you add video as admin. Remember to restart server after changing config.
Also remember that you can be detected as admin (blue nickname in userlist) when you run server locally, and you ip is equal to server ip. This can be disabled with "localAdmins": false
in config.
After I restart docker on webUI, user.json will lost all change. I tried use cli to kill old pod and start new pod, but it will make docker crush.
I think you are running container without v
(volume) argument, that mounts folder to keep data, instead of cleaning it at container exit.
Not sure how to web ui works, but in cli container start is:
docker run --rm -it -p 4200:4200 -v ${PWD}/user:/usr/src/app/user synctube
So there is user
folder mounted to write server state outside of temp container. If chat messages are keeped in history after container restart, then it working.
I have been set this host path setting for volume, so my config.json not be remove. Just user.json be reset
I think there is no volume to user
folder outside of container, so you are:
temp/user/users.json
file inside of container, because you have no link to yourPC/user/
(volume) to write datayourPC/user/users.json
is copied to temp container file system againtemp/user/users.json
and temp/user/state.json
(chat history, playlist) changes (config.json
is not changed by server anyway)I just tested run instructions, and they works for me. I'm a not docker user, since it eats 10 GB for nothing, when you can have 60 MB node
server setup. Have no idea if something should be changed to support WebUI too.
I think I set the right volume on the webUI, I can see the new admin have been add in myPC/user/user.json. The user.json will be reset when I stop container not after run container. Maybe this is a bug of turecharts docker setting. I will try other way. Thank your help a lot.
I set "admins": ["username"] in config.json but when use webUI login admin user, I still cant do anything. This is my config.json setting:
{ "permissions": { "banned": [], "guest": ["writeChat"], "user": ["guest"], "leader": ["user"], "admin": ["user", "clearChat", "setLeader", "lockPlaylist", "banClient"] }, "admins": ["username"] }
I use synctube on Turenas scale docker I tried to set admin user in user.josn,but user.json will reset when docker reboot.