Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Error creating storage backend (installation) #2107

Closed
rphlmm opened this issue Aug 12, 2023 · 2 comments
Closed

[bug] Error creating storage backend (installation) #2107

rphlmm opened this issue Aug 12, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@rphlmm
Copy link

rphlmm commented Aug 12, 2023

Describe the bug with a clear and concise description of what the bug is.

Binary installation failed in the last step (./gotosocial --config-path ./config.yaml server start).
The server is unable to start: "error executing command: error creating storage backend: error opening disk storage: mkdir /gotosocial: permission denied"

PostgreSQL db info:
| raphaelmartinfr_gots | raphaelmartinfr_gots | UTF8 | en_US.UTF-8 | en_US.UTF-8 | pg_default | 9623 K

What's your GoToSocial Version?

v0.11.0-rc2

GoToSocial Arch

linux amd64 Binary

What happened?

[raphaelmartinfr@s21 gotosocial]$ ./gotosocial --config-path ./config.yaml server start
func=cache.(*Caches).Init level=INFO msg="init: 0xc000ce4fc0"
func=cache.(*GTSCaches).initAccount level=INFO msg="Account cache size = 7024"
func=cache.(*GTSCaches).initAccountNote level=INFO msg="AccountNote cache size = 289"
func=cache.(*GTSCaches).initApplication level=INFO msg="Application cache size = 47"
func=cache.(*GTSCaches).initBlock level=INFO msg="Block cache size = 1447"
func=cache.(*GTSCaches).initBlockIDs level=INFO msg="Block IDs cache size = 1505"
func=cache.(*GTSCaches).initBoostOfIDs level=INFO msg="BoostofIDs cache size = 1505"
func=cache.(*GTSCaches).initEmoji level=INFO msg="Emoji cache size = 1339"
func=cache.(*GTSCaches).initEmojiCategory level=INFO msg="EmojiCategory cache size = 49"
func=cache.(*GTSCaches).initFollow level=INFO msg="Follow cache size = 1922"
func=cache.(*GTSCaches).initFollowIDs level=INFO msg="Follow IDs cache size = 2007"
func=cache.(*GTSCaches).initFollowRequest level=INFO msg="FollowRequest cache size = 961"
func=cache.(*GTSCaches).initFollowRequestIDs level=INFO msg="Follow Request IDs cache size = 1003"
func=cache.(*GTSCaches).initInReplyToIDs level=INFO msg="InReplyTo IDs cache size = 1505"
func=cache.(*GTSCaches).initInstance level=INFO msg="Instance cache size = 426"
func=cache.(*GTSCaches).initList level=INFO msg="List cache size = 1445"
func=cache.(*GTSCaches).initListEntry level=INFO msg="ListEntry cache size = 1472"
func=cache.(*GTSCaches).initMarker level=INFO msg="Marker cache size = 246"
func=cache.(*GTSCaches).initMedia level=INFO msg="Media cache size = 1637"
func=cache.(*GTSCaches).initMention level=INFO msg="Mention cache size = 2362"
func=cache.(*GTSCaches).initNotification level=INFO msg="Notification cache size = 2415"
func=cache.(*GTSCaches).initReport level=INFO msg="Report cache size = 431"
func=cache.(*GTSCaches).initStatus level=INFO msg="Status cache size = 7114"
func=cache.(*GTSCaches).initStatusFave level=INFO msg="StatusFave cache size = 2399"
func=cache.(*GTSCaches).initTag level=INFO msg="Tag cache size = 1469"
func=cache.(*GTSCaches).initStatusFaveIDs level=INFO msg="StatusFave IDs cache size = 1505"
func=cache.(*GTSCaches).initTombstone level=INFO msg="Tombstone cache size = 969"
func=cache.(*GTSCaches).initUser level=INFO msg="User cache size = 107"
func=cache.(*GTSCaches).initWebfinger level=INFO msg="Webfinger cache size = 1688"
func=cache.(*VisibilityCache).Init level=INFO msg="Visibility cache size = 7239"
func=cache.(*Caches).Start level=INFO msg="start: 0xc000ce4fc0"
func=bundb.pgConn level=INFO msg="connected to POSTGRES database"
func=migrations.init.35.func1.1 level=INFO msg="dropping previous statuses index, please wait and don't interrupt it (this may take a while)"
func=migrations.init.35.func1.1 level=INFO msg="creating new statuses index, please wait and don't interrupt it (this may take a while)"
func=bundb.doMigration level=INFO msg="MIGRATED DATABASE TO group #2 (31 migrations (20220710153020 ... 20230724100000))"
func=bundb.(*adminDB).CreateInstanceAccount level=INFO msg="instance account blog.raphaelmartin.fr CREATED with id 01DWKP2XPFRBB1FY1BFYYJWJJ2"
func=bundb.(*adminDB).CreateInstanceInstance level=INFO msg="created instance instance blog.raphaelmartin.fr with id 01C2FHA2KKVWQRNPZ40NYV161K"
func=cache.(*Caches).Stop level=INFO msg="stop: 0xc000ce4fc0"
2023/08/12 17:05:37 error executing command: error creating storage backend: error opening disk storage: mkdir /gotosocial: permission denied

What you expected to happen?

No response

How to reproduce it?

No response

Anything else we need to know?

No response

@rphlmm rphlmm added the bug Something isn't working label Aug 12, 2023
@daenney
Copy link
Member

daenney commented Aug 12, 2023

This is a configuration issue. You've got something pointed at /gotosocial, probably the storage-local-base-path, but the process isn't allowed to create that directory tree.

You'll need to reconfigure that to point at something the user gotosocial runs as is allowed to write to.

@daenney
Copy link
Member

daenney commented Aug 21, 2023

I'm going to close this for now as this is most probably a configuration issue. When the storage-backend is set to local, GtS will try to create the necessary directory structure as indicated by storage-local-base-path. This needs to be an area GtS can write to. If you're running from within a container, you have to mount a volume at that path, as shown in the docker-compose example.

The full docs on how to configure storage can be found on: https://docs.gotosocial.org/en/latest/configuration/storage/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants