Why does the lftp mirror command chmod files

Jeremy picture Jeremy · Mar 8, 2012 · Viewed 8.6k times · Source

I'm very new to lftp, so forgive my ignorance.

I just ran a dry run of my lftp script, which consists basically of a line like this: mirror -Rv -x regexp --only-existing --only-newer --dry-run /local/root/dir /remote/dir

When it prints what it's going to do, it wants to chmod a bunch of files - files which I grabbed from svn, never modified, and which should be identical to the ones on the server.

My local machine is Ubuntu, and the remote is a Windows server. I have a few questions:

  1. Why is it trying to do that? Does it try to match file permissions from the local with the remote?
  2. What will happen when it tries to chmod the files? As I understand it, Windows doesn't support chmod - will it just fail gracefully and leave the files alone?

Many thanks!

Answer

markdjones82 picture markdjones82 · Mar 9, 2012

Use the -p option and it shouldn't try to change permissions. I've never sent to a windows host, but you are correct in that it shouldn't do anything to the permission levels on the windows box.