chmod: don't pretend to be root if not root

This commit is contained in:
Aminda Suomalainen 2025-06-06 12:55:55 +03:00
parent 3b0d725756
commit 3964741ca1
Signed by: Mikaela
GPG Key ID: 99392F62BAE30723

6
chmod
View File

@ -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