Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does the lftp mirror command chmod files

Tags:

chmod

ftp

lftp

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!

like image 301
Jeremy Avatar asked Mar 08 '12 00:03

Jeremy


People also ask

How does lftp mirror work?

lftp command has a builtin mirror which can download or update a whole directory tree. There is also a reverse mirror (mirror -R) which uploads or updates a directory tree on the server. The mirror can also synchronize directories between two remote servers, using FXP if available.

What is lftp command?

lftp is a file transfer program that allows sophisticated ftp, http and other connections to other hosts. If site is specified then lftp will connect to that site otherwise a connection has to be established with the open command.

What is lftp in shell script?

lftp is a command-line program client for several file transfer protocols. lftp is designed for Unix and Unix-like operating systems. It was developed by Alexander Lukyanov, and is distributed under the GNU General Public License.

How use lftp command in Unix?

You can launch lftp by typing just lftp and then using an open command to take you to your target site or you can provide the target's name on the same line as lftp like I did.


1 Answers

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.

like image 187
markdjones82 Avatar answered Dec 26 '22 21:12

markdjones82