summaryrefslogtreecommitdiff
path: root/src/tmpfiles
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-12-29 11:00:55 +0100
committerMartin Pitt <martin.pitt@ubuntu.com>2016-12-29 11:00:55 +0100
commite0bc1d70d90ec75d27d287228c1c8821254d5a21 (patch)
tree6c63748511b6890c4ba993a5d4ca17ff0c684f06 /src/tmpfiles
parent9eb484fa40856a5f4d17b1c7dfe414a727758a89 (diff)
tmpfiles: improve error message for chown()/chmod() failures (#4969)
Let's make the error message less confusing here. Fixes: #4954
Diffstat (limited to 'src/tmpfiles')
-rw-r--r--src/tmpfiles/tmpfiles.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 79f75e165b..f4ce9791fb 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -649,7 +649,7 @@ static int path_set_perms(Item *i, const char *path) {
else {
log_debug("chmod \"%s\" to mode %o", path, m);
if (chmod(fn, m) < 0)
- return log_error_errno(errno, "chmod(%s) failed: %m", path);
+ return log_error_errno(errno, "chmod() of %s via %s failed: %m", path, fn);
}
}
@@ -662,7 +662,7 @@ static int path_set_perms(Item *i, const char *path) {
if (chown(fn,
i->uid_set ? i->uid : UID_INVALID,
i->gid_set ? i->gid : GID_INVALID) < 0)
- return log_error_errno(errno, "chown(%s) failed: %m", path);
+ return log_error_errno(errno, "chown() of %s via %s failed: %m", path, fn);
}
}