diff '--color=auto' -ru a/src/main/archives.c b/src/main/archives.c --- a/src/main/archives.c 2023-03-02 05:43:19.000000000 +0300 +++ b/src/main/archives.c 2023-05-25 00:18:25.633405577 +0300 @@ -1063,9 +1063,16 @@ tarobject_set_se_context(fnamevb.buf, fnametmpvb.buf, stab.st_mode); } else { debug(dbg_eachfiledetail, "tarobject nondirectory, 'link' backup"); - if (link(fnamevb.buf,fnametmpvb.buf)) - ohshite(_("unable to make backup link of '%.255s' before installing new version"), - ti->name); + if (link(fnamevb.buf,fnametmpvb.buf)) { + if (errno == EPERM) { + debug(dbg_eachfiledetail, "unable to link, falling back to nonatomic"); + if (rename(fnamevb.buf,fnametmpvb.buf)) + ohshite(_("unable to move aside '%.255s' to install new version"), + ti->name); + } else + ohshite(_("unable to make backup link of '%.255s' before installing new version"), + ti->name); + } } }