Home / Docs / Linux / Linux Filesystems / Linux Filesystem Hierarchy Standard (FHS) / Tmp Persist /tmp permissions¶ Add to /etc/tmpfiles.d/tmp.conf to enforce correct perms¶ echo "d /tmp 1777 root root -" | sudo tee /etc/tmpfiles.d/tmp.conf Or add to /etc/rc.local (if you use it)¶ echo "chmod 1777 /tmp" | sudo tee -a /etc/rc.local Or create a systemd service to enforce it¶ sudo tee /etc/systemd/system/fix-tmp-perms.service <<'EOF' [Unit] Description=Ensure /tmp has correct permissions After=local-fs.target [Service] Type=oneshot ExecStart=/bin/chmod 1777 /tmp RemainAfterExit=yes [Install] WantedBy=multi-user.target EOF sudo systemctl enable fix-tmp-perms.service