# 更改 tmp 目录的位置

**URL:** <https://meta.discourse.org/t/changing-location-of-tmp-directory/139531>\
**Category:** Development\
**Created:** [2020年一月23日 13:55 UTC](https://meta.discourse.org/t/changing-location-of-tmp-directory/139531 "2020-01-23T13:55:34Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Nikolay](https://avatars.discourse-cdn.com/v4/letter/n/a698b9/32.png) [@Nikolay](https://meta.discourse.org/u/Nikolay)\
**Post date:** [2020年一月23日 15:03 UTC](https://meta.discourse.org/t/changing-location-of-tmp-directory/139531/3 "2020-01-23T15:03:05Z")

</div>

问题出在我将 Discourse 从宿主机挂载到了 Docker，导致 /var/discourse 目录在宿主机（Windows）和客户端操作系统（Linux）之间共享。因此出现了一些问题。

我今天描述的问题之一：[Problem with development on Windows with Docker and mounted volume](https://meta.discourse.org/t/problem-with-development-on-windows-with-docker-and-mounted-volume/139523)

当 Discourse 尝试在“tmp”目录中生成文件时会出现错误，因为它期望文件系统区分大小写，而挂载的目录使用的是 Windows NTFS 文件系统，该文件系统不区分大小写。

如果我能够将 tmp 目录的位置更改为 /tmp，问题就会消失，因为客户机操作系统的文件系统是 ext4，支持区分大小写的目录。

---

_[View the full topic](https://meta.discourse.org/t/changing-location-of-tmp-directory/139531)._
