From 3964741ca1ee57495550032b2f014e9d37f35894 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Fri, 6 Jun 2025 12:55:55 +0300 Subject: [PATCH] chmod: don't pretend to be root if not root --- chmod | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chmod b/chmod index 108e62cc..ba591609 100755 --- a/chmod +++ b/chmod @@ -49,8 +49,10 @@ if hash setfacl 2> /dev/null; then fi # Fedora Atomic compatibility -if [ -d /var/roothome ]; then - chmod -v a+x /var/roothome +if [ "$(id -u)" == "0" ]; then + if [ -d /var/roothome ]; then + chmod -v a+x /var/roothome + fi fi set +x