>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]
 
[EMAIL PROTECTED]:/tmp$ mkdir -p a/b
[EMAIL PROTECTED]:/tmp$ echo foo > a/b/foo.txt
[EMAIL PROTECTED]:/tmp$ chmod 555 a/b

[ site b ]
 
[EMAIL PROTECTED]:/tmp$ mkdir -p a/b
[EMAIL PROTECTED]:/tmp$ chmod 555 a/b

 
 
[ site a ]
 
[EMAIL PROTECTED]:/tmp/a$ lftp -u oracle rac1
Password:
lftp [EMAIL PROTECTED]:~> cd /tmp/a
cd ok, cwd=/tmp/a
lftp [EMAIL PROTECTED]:/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 ]
 
[EMAIL PROTECTED]:/tmp/a$ chmod 755 b
[EMAIL PROTECTED]:/tmp/a$ echo 12345 >  b/foo.txt
[EMAIL PROTECTED]:/tmp/a$ chmod 555 b

 
 
[ site a ]
 
lftp [EMAIL PROTECTED]:~> cd /tmp/a
cd ok, cwd=/tmp/a
lftp [EMAIL PROTECTED]:/tmp/a> mirror -eR ./ ./
Total: 2 directories, 1 file, 0 symlinks
Modified: 1 file, 0 symlinks
4 bytes transferred
lftp [EMAIL PROTECTED]:/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.

Reply via email to