--- install.c.orig Thu Oct 25 13:15:02 2001 +++ install.c Thu Oct 25 13:19:37 2001 @@ -465,15 +465,21 @@ want to know. But AFS returns EPERM when you try to change a file's group; thus the kludge. */ - if (chown (path, owner_id, group_id) + /* If we're not changing the owner or group, don't do chown at all. + * The chown operation doesn't seem to be permitted on smbfs. */ + + if ((owner_id != (uid_t) -1) || (group_id != (gid_t) -1)) + { + if (chown (path, owner_id, group_id) #ifdef AFS - && errno != EPERM + && errno != EPERM #endif - ) + ) { error (0, errno, "cannot change ownership of %s", quote (path)); err = 1; } + } if (!err && chmod (path, mode)) {