4 Sep 2008 00:50
errors with mirror
<chris.ulherr <at> tektronix.com>
2008-09-03 22:50:43 GMT
2008-09-03 22:50:43 GMT
From
time to time, I get a permission denied message for some files when
transferring. Below is one such reproducible example. I believe this
could be fixed by having lftp change permissions on the directory before
attempting to sync the files underneath it:
[ site a]
alive <at> gridctrl:/tmp$ mkdir -p a/b
alive <at> gridctrl:/tmp$ echo foo > a/b/foo.txt
alive <at> gridctrl:/tmp$ chmod 555 a/b
alive <at> gridctrl:/tmp$ echo foo > a/b/foo.txt
alive <at> gridctrl:/tmp$ chmod 555 a/b
[ site b
]
oracle <at> rac1:/tmp$ mkdir -p a/b
oracle <at> rac1:/tmp$ chmod 555 a/b
oracle <at> rac1:/tmp$ chmod 555 a/b
[ site a
]
alive <at> gridctrl:/tmp/a$ lftp -u oracle
rac1
Password:
lftp oracle <at> rac1:~> cd /tmp/a
cd ok, cwd=/tmp/a
lftp oracle <at> rac1:/tmp/a> mirror -eR ./ ./
mirror: Access failed: 553 foo.txt: Permission denied.
Total: 2 directories, 1 file, 0 symlinks
New: 1 file, 0 symlinks
4 bytes transferred
2 errors detected
Password:
lftp oracle <at> rac1:~> cd /tmp/a
cd ok, cwd=/tmp/a
lftp oracle <at> rac1:/tmp/a> mirror -eR ./ ./
mirror: Access failed: 553 foo.txt: Permission denied.
Total: 2 directories, 1 file, 0 symlinks
New: 1 file, 0 symlinks
4 bytes transferred
2 errors detected
Now, if you repeat
the test, but this time actually have a file named foo.txt on site b under
/tmp/a/b (it doesn't have to be the same file, or the same size, just so long as
some file exists, it will update it without
problems):
[ site b
]
oracle <at> rac1:/tmp/a$ chmod 755 b
oracle <at> rac1:/tmp/a$ echo 12345 > b/foo.txt
oracle <at> rac1:/tmp/a$ chmod 555 b
oracle <at> rac1:/tmp/a$ echo 12345 > b/foo.txt
oracle <at> rac1:/tmp/a$ chmod 555 b
[ site a
]
lftp oracle <at> rac1:~> cd /tmp/a
cd ok, cwd=/tmp/a
lftp oracle <at> rac1:/tmp/a> mirror -eR ./ ./
Total: 2 directories, 1 file, 0 symlinks
Modified: 1 file, 0 symlinks
4 bytes transferred
lftp oracle <at> rac1:/tmp/a>
cd ok, cwd=/tmp/a
lftp oracle <at> rac1:/tmp/a> mirror -eR ./ ./
Total: 2 directories, 1 file, 0 symlinks
Modified: 1 file, 0 symlinks
4 bytes transferred
lftp oracle <at> rac1:/tmp/a>
Pehaps lftp can
change the directory permissions to allow files to be written, and then at the
end, it could set them as they exist on the source
system.
RSS Feed