From a763fe4e88b7cd8bc0b7afadb58edbcadc1f48d4 Mon Sep 17 00:00:00 2001 From: Beginner <70857188+Beginner-Go@users.noreply.github.com> Date: Tue, 26 Oct 2021 22:22:11 +0800 Subject: [PATCH] base-files: chmod 1777 /var/lock (#8120) Per FHS 3.0, /var/lock is the location for lock files [1]. However its current permissions (755) are too restrictive for use by unprivileged processes. Debian and Ubuntu set them to 1777, and now so do we. [1] Signed-off-by: Deomid Ryabkov [fixed typo in commit message, had to remove "rojer" due to git hooks] Signed-off-by: Christian Lamparter Co-authored-by: Deomid Ryabkov --- package/base-files/files/etc/init.d/boot | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot index a1e8e828d..e1c60c1c2 100755 --- a/package/base-files/files/etc/init.d/boot +++ b/package/base-files/files/etc/init.d/boot @@ -21,9 +21,10 @@ boot() { [ -f /proc/mounts ] || /sbin/mount_root [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc - mkdir -p /var/run - mkdir -p /var/log mkdir -p /var/lock + chmod 1777 /var/lock + mkdir -p /var/log + mkdir -p /var/run mkdir -p /var/state mkdir -p /var/tmp mkdir -p /tmp/.uci