This is already done for [f]chown errors. Fix from CurlyMo <curlymoo1@gmail.com>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
*/
#if defined(HAVE_FCHMOD)
- if (fchmod (ofd, source_stats.st_ex_mode & 07777))
+ if ((fchmod (ofd, source_stats.st_ex_mode & 07777) == -1) &&
+ (errno != EPERM))
#else
- if (chmod (dest, source_stats.st_ex_mode & 07777))
+ if ((chmod (dest, source_stats.st_ex_mode & 07777) == -1) &&
+ (errno != EPERM))
#endif
goto err;