Error CLI: can't become an admin #2261
-
Hi, I recently self-hosted Ente and everything is working fine, but I'm encountering an issue while trying to increase storage. I followed the official server administration guide and created a museum.yaml file in the server directory alongside compose.yaml. I configured it as per the example, specifying the correct account ID I want to grant admin privileges to. Than I've installed and configured the latest version of the CLI for Windows. After rebuilding Docker with 'docker compose up --build -d', I added the account in the cli and attempted to increase its storage using the command:
However, I encountered the following error:
The museum logs show:
I still don't seem to have admin privileges, but I'm pretty sure that the ID in the museum.yaml file is correct because I copied it from the one shown in the CLI using 'ente account list'. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 12 replies
-
One possibility is that there is something amiss in the YAML config. Unfortunately, YAML has a lot of hidden traps and it is easy for things to look correct but not be what we intend. To rule this out, you could (for example) try and debug by printing the config that the running museum is seeing. For example, adding a ente/server/pkg/middleware/auth.go Line 81 in e390d73 |
Beta Was this translation helpful? Give feedback.
-
I've added some logs and noticed that there are no admins:
So probably there is something wrong in the YAML config right? This is my museum.yaml config:
|
Beta Was this translation helpful? Give feedback.
-
But we don't know if it found your museum.yaml :) Let us try logging the entire file contents that it reads (or the file size, or something). Again, I'm not 100% sure what's going wrong, I'm just giving suggestions to help figure the issue out.
Right, those are not related. |
Beta Was this translation helpful? Give feedback.
-
I had the same problem but after adding this to museum.yaml
it worked! I'm using docker running published images using this doc https://github.com/ente-io/ente/blob/main/server/docs/docker.md |
Beta Was this translation helpful? Give feedback.
So the gist seems to be that admin is present after reading the config
But is lost when we try to get in with
If you're up for debugging then you could try and find out where in the middle it is getting lost. Also might be a good idea to add a printf for
admins := viper.GetIntSlice("internal.admins")
at the same point where you're doing the test print fromsettings := viper.AllSettings()
.All that's if you wish to debug. OTOH, if you just wish to unblock yourself, one easy way is to change:
to
Another way is to directly modify the storage in the DB, someth…