X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/929002a2d5e6491c63877836deb67834f87918f7..3b22184d4c61e6dc77ec15f93bb760046c40533e:/util.c diff --git a/util.c b/util.c index 02085d42..9d5f1800 100644 --- a/util.c +++ b/util.c @@ -329,6 +329,11 @@ int copy_file(const char *source, const char *dest, int ofd, mode_t mode) return -1; } +#ifdef SUPPORT_XATTRS + if (preserve_xattrs) + mode |= S_IWUSR; +#endif + mode &= INITACCESSPERMS; if ((ofd = do_open(dest, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, mode)) < 0) { int save_errno = errno; rsyserr(FERROR_XFER, save_errno, "open %s", full_fname(dest));