- FreeBSD and MacOS have a lchmod() system call and a chmod with
option -h that allow to chnage the permission of o symlink
instead of having a fixed lrwxrwxrwx, these system can have
a custom one.
ok = false;
}
#endif
+#ifdef HAVE_LCHMOD
+ if (lchmod(attr->ofname, attr->statp.st_mode) < 0 && print_error(jcr)) {
+ berrno be;
+ Jmsg2(jcr, M_ERROR, 0, _("Unable to set file modes %s: ERR=%s\n"),
+ attr->ofname, be.bstrerror());
+ ok = false;
+ }
+#endif
#ifdef HAVE_LUTIMES
struct timeval times[2];
times[0].tv_sec = attr->statp.st_atime;