summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuupertunut <tuupertunut@outlook.com>2022-07-10 07:45:08 +0300
committerRadek Podgorny <radek@podgorny.cz>2022-07-15 13:22:23 +0200
commitb63805568e3acb2fbb55a8a185f39f0737cb1960 (patch)
treebbb3b373b0a57f709976a29e5052dedd5446b610
parentcd411e75162e1b31b7a3630b45185ace408dd83b (diff)
downloadunionfs-fuse-git-b63805568e3acb2fbb55a8a185f39f0737cb1960.tar.gz
Fix cow-copy failing if owner is nobody
-rw-r--r--src/cow_utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cow_utils.c b/src/cow_utils.c
index e3a054b..8a746fe 100644
--- a/src/cow_utils.c
+++ b/src/cow_utils.c
@@ -91,7 +91,9 @@ int setfile(const char *path, struct stat *fs)
* chown. If chown fails, lose setuid/setgid bits.
*/
if (chown(path, fs->st_uid, fs->st_gid)) {
- if (errno != EPERM) {
+ /* EPERM if no permissions
+ * EINVAL if user was nobody or group was nogroup */
+ if (errno != EPERM && errno != EINVAL) {
USYSLOG(LOG_WARNING, "chown: %s", path);
rval = 1;
}