# 新しいVPSのインストールで「permission denied」エラー

**URL:** https://meta.discourse.org/t/getting-permission-denied-on-new-vps-install/301983
**Category:** Self-hosting
**Created:** [2024 年 4 月 2 日午前 3:39 UTC](https://meta.discourse.org/t/getting-permission-denied-on-new-vps-install/301983 "2024-04-02T03:39:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![45thj5ej](https://avatars.discourse-cdn.com/v4/letter/4/34f0e0/32.png) [@45thj5ej](https://meta.discourse.org/u/45thj5ej)
#### Post date: [2024 年 4 月 2 日午前 3:39 UTC](https://meta.discourse.org/t/getting-permission-denied-on-new-vps-install/301983/1 "2024-04-02T03:39:31Z")

</div>

VPSサーバーを切り替えています。古いVPSを破棄する前に、`/var/discourse`から「discourse」フォルダ全体をダウンロードしてWindowsマシンに保存しました。その後、新しいUbuntu VPSを取得し、DockerとGitをインストールしました。Discourseをクローンする代わりに、古いVPSから既に持っていたdiscourseフォルダをそのまま転送しました。

これで、`sudo ./launcher rebuild app`を実行すると、「permission denied」というエラーが発生します。その後、後戻りして`./discourse-setup`を実行しようとしましたが、既に機能していたdiscourseフォルダをそこへ移動したため、`'/var/discourse' already exists and is not an empty directory.`というエラーが発生します。しかし、なぜアクセスが拒否されるのでしょうか？また、`chmod 700 containers`コマンドも実行しました。

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [2024 年 4 月 2 日午前 4:15 UTC](https://meta.discourse.org/t/getting-permission-denied-on-new-vps-install/301983/2 "2024-04-02T04:15:03Z")

</div>

こんにちは 👋

これは、Discourse を別のサーバーに移動する正しい方法です。

> [@Move your Discourse Instance to a Different Server](https://meta.discourse.org/t/move-your-discourse-instance-to-a-different-server/15721?u=don):
>
> bookmark This is a guide for moving your Discourse instance from one server to another, including all settings and data. This guide applies to self-hosted Discourse instances using Docker. person_raising_hand Required user level: System Administrator warning This procedure involves domain and DNS changes. Ensure you have access to both the source and destination servers. This guide walks you through the process of migrating your Discourse instance from one server to another, ensuring …

---

<div class="post-metadata">

### Author: ![45thj5ej](https://avatars.discourse-cdn.com/v4/letter/4/34f0e0/32.png) [@45thj5ej](https://meta.discourse.org/u/45thj5ej)
#### Post date: [2024 年 4 月 2 日午前 4:18 UTC](https://meta.discourse.org/t/getting-permission-denied-on-new-vps-install/301983/3 "2024-04-02T04:18:03Z")

</div>

返信をもらう前にCLIコマンドで済ませてしまいましたが、古いDiscourseフォルダを新しいVPSにドラッグアンドドロップできないのは本当に奇妙ですね、笑。とにかくありがとうございました！新しいVPSからDiscourseフォルダを削除し、再度`./discourse-setup`セットアップを実行してからCLIリストアチュートリアルに従いました。

うーん、フォーラムのURLは機能しますが、直接の`mysite.com`のURLが機能しなくなりました…
