Wednesday, 21 May 2025

Re: /tmp and /var/tmp in Ubuntu

On Wed, May 21, 2025 at 10:29 AM Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> Hello Nick,
>
> Mounting /tmp as tmpfs makes sense on systems that are not very memory constrained. I have been using this for the last years on all my systems.
>
> I am wondering which mount option shall be used. I have tended to mount with nosuid,nodev. But there are some rare use cases, e.g. with chroots where this runs into issues.
>

Taken from /usr/lib/systemd/system/tmp.mount:

Options=mode=1777,strictatime,nosuid,nodev,size=50%%,nr_inodes=1m

So yes, nosuid and nodev are used by default.

-Nick

--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel