diff options
author | Tuupertunut <tuupertunut@outlook.com> | 2022-07-10 07:45:08 +0300 |
---|---|---|
committer | Radek Podgorny <radek@podgorny.cz> | 2022-07-15 13:22:23 +0200 |
commit | b63805568e3acb2fbb55a8a185f39f0737cb1960 (patch) | |
tree | bbb3b373b0a57f709976a29e5052dedd5446b610 | |
parent | cd411e75162e1b31b7a3630b45185ace408dd83b (diff) | |
download | unionfs-fuse-git-b63805568e3acb2fbb55a8a185f39f0737cb1960.tar.gz |
Fix cow-copy failing if owner is nobody
-rw-r--r-- | src/cow_utils.c | 4 |
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; } |