Rsync - write permission denied
I use rsync
on Windows (Cygwin), where I move files from shared folder (from another Windows instance) to NFS storage. I have mapped the shared folder to one drive and mounted the NFS folder to another.
I started the rsync
command this way:
C:cygwin64binrsync.exe -vrH --perms --partial --delete --stats --log-file=/home/Administrator/rsynclogs/backup.log /cygdrive/z/ /cygdrive/w/
After 30 minutes of running and about 17,000 files transferred if failed on error:
rsync: write failed on "/cygdrive/w/domainName/Uploads/index_635244981053162421.html": Permission denied (13)
I can't see any reason for the permission denied error. For example, if I copy the file by hand it copies successfully.
I know that this is a shortcoming of the rsync
protocol. The rsync
protocol can't determine beforehand if it has write permissions at the target. Instead it just sends and checks for success or failure afterwards.
I don't have ssh
access to the NFS server - it's a storage instance. The source Windows client has Cygwin but does not have access to the NFS storage.
We are moving from an old 2008 server to anew one. One of the changes is to move all storage to a shared nfs storage. I know that this configuration is not perfect, but it's temporary. I need it to work properly for a month or so. NFS service can't be installed on the 2008 server unfortunately otherwise there wouldn't any need in rsync.
How can I make my copy continue running even if there is an error?
I thought using those options:
--partial-dir=DIR
--delay-updates
--inplace
--ignore-errors
but it looks like it won't really solve my problem. Any suggestions?
windows rsync nfs cygwin
|
show 3 more comments
I use rsync
on Windows (Cygwin), where I move files from shared folder (from another Windows instance) to NFS storage. I have mapped the shared folder to one drive and mounted the NFS folder to another.
I started the rsync
command this way:
C:cygwin64binrsync.exe -vrH --perms --partial --delete --stats --log-file=/home/Administrator/rsynclogs/backup.log /cygdrive/z/ /cygdrive/w/
After 30 minutes of running and about 17,000 files transferred if failed on error:
rsync: write failed on "/cygdrive/w/domainName/Uploads/index_635244981053162421.html": Permission denied (13)
I can't see any reason for the permission denied error. For example, if I copy the file by hand it copies successfully.
I know that this is a shortcoming of the rsync
protocol. The rsync
protocol can't determine beforehand if it has write permissions at the target. Instead it just sends and checks for success or failure afterwards.
I don't have ssh
access to the NFS server - it's a storage instance. The source Windows client has Cygwin but does not have access to the NFS storage.
We are moving from an old 2008 server to anew one. One of the changes is to move all storage to a shared nfs storage. I know that this configuration is not perfect, but it's temporary. I need it to work properly for a month or so. NFS service can't be installed on the 2008 server unfortunately otherwise there wouldn't any need in rsync.
How can I make my copy continue running even if there is an error?
I thought using those options:
--partial-dir=DIR
--delay-updates
--inplace
--ignore-errors
but it looks like it won't really solve my problem. Any suggestions?
windows rsync nfs cygwin
4
I'm voting to close this question as off-topic because it is not about Unix or Linux.
– Sparhawk
Dec 11 at 9:47
I would recommend asking on another site, such as SuperUser.
– Sparhawk
Dec 11 at 9:47
2
@Sparhawk Cygwin is not off topic here
– roaima
Dec 11 at 9:49
2
@roaima Oops. Apologies. I missed that (slightly hidden) part, and assumed it was about a Windows port of rsync.
– Sparhawk
Dec 11 at 10:58
Hello Matisa, 1. You've got a permission denied error on a file. What happens if you try to copy or create the target file yourself (copy
,notepad
,explorer
, whatever). I'd like to ascertain whether it'srsync
failing, or if there is a real permissions issue on the target. 2. If you rerun thersync
command does it carry on from where it left off? And if not, what happens?
– roaima
Dec 11 at 11:18
|
show 3 more comments
I use rsync
on Windows (Cygwin), where I move files from shared folder (from another Windows instance) to NFS storage. I have mapped the shared folder to one drive and mounted the NFS folder to another.
I started the rsync
command this way:
C:cygwin64binrsync.exe -vrH --perms --partial --delete --stats --log-file=/home/Administrator/rsynclogs/backup.log /cygdrive/z/ /cygdrive/w/
After 30 minutes of running and about 17,000 files transferred if failed on error:
rsync: write failed on "/cygdrive/w/domainName/Uploads/index_635244981053162421.html": Permission denied (13)
I can't see any reason for the permission denied error. For example, if I copy the file by hand it copies successfully.
I know that this is a shortcoming of the rsync
protocol. The rsync
protocol can't determine beforehand if it has write permissions at the target. Instead it just sends and checks for success or failure afterwards.
I don't have ssh
access to the NFS server - it's a storage instance. The source Windows client has Cygwin but does not have access to the NFS storage.
We are moving from an old 2008 server to anew one. One of the changes is to move all storage to a shared nfs storage. I know that this configuration is not perfect, but it's temporary. I need it to work properly for a month or so. NFS service can't be installed on the 2008 server unfortunately otherwise there wouldn't any need in rsync.
How can I make my copy continue running even if there is an error?
I thought using those options:
--partial-dir=DIR
--delay-updates
--inplace
--ignore-errors
but it looks like it won't really solve my problem. Any suggestions?
windows rsync nfs cygwin
I use rsync
on Windows (Cygwin), where I move files from shared folder (from another Windows instance) to NFS storage. I have mapped the shared folder to one drive and mounted the NFS folder to another.
I started the rsync
command this way:
C:cygwin64binrsync.exe -vrH --perms --partial --delete --stats --log-file=/home/Administrator/rsynclogs/backup.log /cygdrive/z/ /cygdrive/w/
After 30 minutes of running and about 17,000 files transferred if failed on error:
rsync: write failed on "/cygdrive/w/domainName/Uploads/index_635244981053162421.html": Permission denied (13)
I can't see any reason for the permission denied error. For example, if I copy the file by hand it copies successfully.
I know that this is a shortcoming of the rsync
protocol. The rsync
protocol can't determine beforehand if it has write permissions at the target. Instead it just sends and checks for success or failure afterwards.
I don't have ssh
access to the NFS server - it's a storage instance. The source Windows client has Cygwin but does not have access to the NFS storage.
We are moving from an old 2008 server to anew one. One of the changes is to move all storage to a shared nfs storage. I know that this configuration is not perfect, but it's temporary. I need it to work properly for a month or so. NFS service can't be installed on the 2008 server unfortunately otherwise there wouldn't any need in rsync.
How can I make my copy continue running even if there is an error?
I thought using those options:
--partial-dir=DIR
--delay-updates
--inplace
--ignore-errors
but it looks like it won't really solve my problem. Any suggestions?
windows rsync nfs cygwin
windows rsync nfs cygwin
edited Dec 11 at 16:43
roaima
42.7k551116
42.7k551116
asked Dec 11 at 9:42
matisa
477
477
4
I'm voting to close this question as off-topic because it is not about Unix or Linux.
– Sparhawk
Dec 11 at 9:47
I would recommend asking on another site, such as SuperUser.
– Sparhawk
Dec 11 at 9:47
2
@Sparhawk Cygwin is not off topic here
– roaima
Dec 11 at 9:49
2
@roaima Oops. Apologies. I missed that (slightly hidden) part, and assumed it was about a Windows port of rsync.
– Sparhawk
Dec 11 at 10:58
Hello Matisa, 1. You've got a permission denied error on a file. What happens if you try to copy or create the target file yourself (copy
,notepad
,explorer
, whatever). I'd like to ascertain whether it'srsync
failing, or if there is a real permissions issue on the target. 2. If you rerun thersync
command does it carry on from where it left off? And if not, what happens?
– roaima
Dec 11 at 11:18
|
show 3 more comments
4
I'm voting to close this question as off-topic because it is not about Unix or Linux.
– Sparhawk
Dec 11 at 9:47
I would recommend asking on another site, such as SuperUser.
– Sparhawk
Dec 11 at 9:47
2
@Sparhawk Cygwin is not off topic here
– roaima
Dec 11 at 9:49
2
@roaima Oops. Apologies. I missed that (slightly hidden) part, and assumed it was about a Windows port of rsync.
– Sparhawk
Dec 11 at 10:58
Hello Matisa, 1. You've got a permission denied error on a file. What happens if you try to copy or create the target file yourself (copy
,notepad
,explorer
, whatever). I'd like to ascertain whether it'srsync
failing, or if there is a real permissions issue on the target. 2. If you rerun thersync
command does it carry on from where it left off? And if not, what happens?
– roaima
Dec 11 at 11:18
4
4
I'm voting to close this question as off-topic because it is not about Unix or Linux.
– Sparhawk
Dec 11 at 9:47
I'm voting to close this question as off-topic because it is not about Unix or Linux.
– Sparhawk
Dec 11 at 9:47
I would recommend asking on another site, such as SuperUser.
– Sparhawk
Dec 11 at 9:47
I would recommend asking on another site, such as SuperUser.
– Sparhawk
Dec 11 at 9:47
2
2
@Sparhawk Cygwin is not off topic here
– roaima
Dec 11 at 9:49
@Sparhawk Cygwin is not off topic here
– roaima
Dec 11 at 9:49
2
2
@roaima Oops. Apologies. I missed that (slightly hidden) part, and assumed it was about a Windows port of rsync.
– Sparhawk
Dec 11 at 10:58
@roaima Oops. Apologies. I missed that (slightly hidden) part, and assumed it was about a Windows port of rsync.
– Sparhawk
Dec 11 at 10:58
Hello Matisa, 1. You've got a permission denied error on a file. What happens if you try to copy or create the target file yourself (
copy
, notepad
, explorer
, whatever). I'd like to ascertain whether it's rsync
failing, or if there is a real permissions issue on the target. 2. If you rerun the rsync
command does it carry on from where it left off? And if not, what happens?– roaima
Dec 11 at 11:18
Hello Matisa, 1. You've got a permission denied error on a file. What happens if you try to copy or create the target file yourself (
copy
, notepad
, explorer
, whatever). I'd like to ascertain whether it's rsync
failing, or if there is a real permissions issue on the target. 2. If you rerun the rsync
command does it carry on from where it left off? And if not, what happens?– roaima
Dec 11 at 11:18
|
show 3 more comments
1 Answer
1
active
oldest
votes
I would suggest that you modify your rsync
command to maintain file times, so that it can identify whether or not a file needs to be recopied. Use the --times
flag (-t
) for this.
You have stated that your permissions error is transient, so I would suggest you just put the process into a loop. Put this into a file and run it from bash
#!/bin/bash
while :
do
rsync -rptv --partial --delete --stats --log-file=/home/Administrator/rsynclogs/backup.log /cygdrive/z/ /cygdrive/w/ && break
sleep 30
done
As a possible improvement you may want to consider replacing the flags -rpt
with -a
(--archive
), which also maintains file ownership.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f487296%2frsync-write-permission-denied%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I would suggest that you modify your rsync
command to maintain file times, so that it can identify whether or not a file needs to be recopied. Use the --times
flag (-t
) for this.
You have stated that your permissions error is transient, so I would suggest you just put the process into a loop. Put this into a file and run it from bash
#!/bin/bash
while :
do
rsync -rptv --partial --delete --stats --log-file=/home/Administrator/rsynclogs/backup.log /cygdrive/z/ /cygdrive/w/ && break
sleep 30
done
As a possible improvement you may want to consider replacing the flags -rpt
with -a
(--archive
), which also maintains file ownership.
add a comment |
I would suggest that you modify your rsync
command to maintain file times, so that it can identify whether or not a file needs to be recopied. Use the --times
flag (-t
) for this.
You have stated that your permissions error is transient, so I would suggest you just put the process into a loop. Put this into a file and run it from bash
#!/bin/bash
while :
do
rsync -rptv --partial --delete --stats --log-file=/home/Administrator/rsynclogs/backup.log /cygdrive/z/ /cygdrive/w/ && break
sleep 30
done
As a possible improvement you may want to consider replacing the flags -rpt
with -a
(--archive
), which also maintains file ownership.
add a comment |
I would suggest that you modify your rsync
command to maintain file times, so that it can identify whether or not a file needs to be recopied. Use the --times
flag (-t
) for this.
You have stated that your permissions error is transient, so I would suggest you just put the process into a loop. Put this into a file and run it from bash
#!/bin/bash
while :
do
rsync -rptv --partial --delete --stats --log-file=/home/Administrator/rsynclogs/backup.log /cygdrive/z/ /cygdrive/w/ && break
sleep 30
done
As a possible improvement you may want to consider replacing the flags -rpt
with -a
(--archive
), which also maintains file ownership.
I would suggest that you modify your rsync
command to maintain file times, so that it can identify whether or not a file needs to be recopied. Use the --times
flag (-t
) for this.
You have stated that your permissions error is transient, so I would suggest you just put the process into a loop. Put this into a file and run it from bash
#!/bin/bash
while :
do
rsync -rptv --partial --delete --stats --log-file=/home/Administrator/rsynclogs/backup.log /cygdrive/z/ /cygdrive/w/ && break
sleep 30
done
As a possible improvement you may want to consider replacing the flags -rpt
with -a
(--archive
), which also maintains file ownership.
answered Dec 11 at 16:52
roaima
42.7k551116
42.7k551116
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f487296%2frsync-write-permission-denied%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
4
I'm voting to close this question as off-topic because it is not about Unix or Linux.
– Sparhawk
Dec 11 at 9:47
I would recommend asking on another site, such as SuperUser.
– Sparhawk
Dec 11 at 9:47
2
@Sparhawk Cygwin is not off topic here
– roaima
Dec 11 at 9:49
2
@roaima Oops. Apologies. I missed that (slightly hidden) part, and assumed it was about a Windows port of rsync.
– Sparhawk
Dec 11 at 10:58
Hello Matisa, 1. You've got a permission denied error on a file. What happens if you try to copy or create the target file yourself (
copy
,notepad
,explorer
, whatever). I'd like to ascertain whether it'srsync
failing, or if there is a real permissions issue on the target. 2. If you rerun thersync
command does it carry on from where it left off? And if not, what happens?– roaima
Dec 11 at 11:18