From 0f5897760272307d671f4c4c11737241755e853d Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 26 Jan 2017 12:56:24 +0100 Subject: [PATCH] init: fix /tmp permissions on zram mkfs.ext4 will create the filesystem with 755, we need to chmod to 1777 explicitly. Signed-off-by: Matthias Schiffer --- initd/zram.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/initd/zram.c b/initd/zram.c index 49480af..9fab794 100644 --- a/initd/zram.c +++ b/initd/zram.c @@ -124,5 +124,11 @@ mount_zram_on_tmp(void) LOG("Using up to %ld kB of RAM as ZRAM storage on /mnt\n", zramsize); + ret = chmod("/tmp", 01777); + if (ret < 0) { + ERROR("Can't set /tmp mode to 1777: %s\n", strerror(errno)); + return errno; + } + return 0; } -- 2.11.0