admin avatar

開源微博pleroma的升級紀錄

🕒 by admin

開源微博pleroma的升級紀錄,下面是代碼

1
2
3
4
5
6
7
对于OTP安装¶

# Download the new release
su pleroma -s $SHELL -lc "./bin/pleroma_ctl update"

# Migrate the database, you are advised to stop the instance before doing that
su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate"

但是有一個問題,如果使用其他用戶權限運行,比如非默認的pleroma運行,或者在升級時使用了root權限執行,那麼升級的文件權限也會變化,這樣就會出現以下報錯信息,建議那個帳號運行就用哪個帳號執行升級。

1
2
3
4
5
6
7
8
ERROR! Config provider Pleroma.Config.ReleaseRuntimeProvider failed with:
** (RuntimeError) Configuration at /var/pleroma/config.exs has world-permissions, execute the following: chmod o= /var/pleroma/config.exs
    lib/pleroma/config/release_runtime_provider.ex:27: Pleroma.Config.ReleaseRuntimeProvider.load/2
    (elixir 1.11.4) lib/config/provider.ex:347: anonymous fn/2 in Config.Provider.run_providers/2
    (elixir 1.11.4) lib/enum.ex:2193: Enum."-reduce/3-lists^foldl/2-0-"/3
    (elixir 1.11.4) lib/config/provider.ex:204: Config.Provider.boot_providers/4
    :init.eval_script/2
    :init.do_boot/3

解決方法移除其它用戶的權限即可

chmod o= /var/pleroma/config.exs

再次執行升級即可

1
2
3
4
5
6
7
对于OTP安装¶

# Download the new release
su pleroma -s $SHELL -lc "./bin/pleroma_ctl update"

# Migrate the database, you are advised to stop the instance before doing that
su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate"
參考

https://docs-develop.pleroma.social/backend/administration/updating/

💘 相关文章

写一条评论