Score:0

Rsync: "chown failed: permission denied (13)"

de flag

I run a rsync task every midnight using the following command:

rsync -ahzP --stats --update --delete-before --delete-excluded --exclude "*.log" --exclude temp /mnt/raid/ /mnt/backups > /root/ext_backup.log 2>&1

/mnt/backups is a NFS mount.

The backup process runs smoothly for about half an hour, then I get the following error:

rsync: [receiver] write failed on "/my/file": Input/output error (5)
rsync: [receiver] chown "/my/file" failed: Permission denied (13)
rsync error: error in file IO (code 11) at receiver.c(378) [receiver=3.2.3]

rsync: [sender] write error: Broken pipe (32)

What could be the problem?

Alex avatar
in flag
the output is self explanatory on what's wrong. further info will require more details on the file
alex3025 avatar
de flag
@Alex what further info do you need?
ph flag
According to the error message, `rsync` doesn't have permission to change the owner (`chown`) of the file. This is probably due to how the NFS mount permissions are set up and/or what user `rsync` is running as.
alex3025 avatar
de flag
@GordonDavisson rsync is running as root, and I allowed "Everyone" to r/w to the directory (NFS share from Windows Server 2022).
de flag
@alex3025 you need `no_root_squash` to keep root mapping on the server. Otherwise root will be mapped to nobody and chown will fail.
alex3025 avatar
de flag
@kofemann so I need to allow `no_root_squash` on my NFS server or client?
de flag
This is en export option in the server
alex3025 avatar
de flag
@kofemann I can't find where enable that option in Windows Server.
de flag
No idea how it done under windows. May be this links will help https://techcommunity.microsoft.com/t5/storage-at-microsoft/nfs-identity-mapping-in-windows-server-2012/ba-p/424602
Score:1
de flag

To fix this problem it was necessary to check the "Allow root access" checkbox.

enter image description here

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.