F
F
fulltext2018-11-25 16:41:24
rsync
fulltext, 2018-11-25 16:41:24

Debian 8 lsyncd+rsync synchronization - why aren't folder/file permissions copied?

Hello
lsyncd configuration:

settings = {
  logfile    = "/var/log/lsyncd/lsyncd.log", 
  statusFile = "/var/log/lsyncd/lsyncd.status", 
  statusInterval = 5,
  nodaemon   = true, 
}
sync {
    default.rsyncssh,
    source="/var/www/html",
    host="remote-ip-addres",
    targetdir="/var/www/html",
    rsync = {
        sparse = true,
        update = true,
        temp_dir="/tmp/",
        links = true,
        times = true,
        protect_args = false,
        archive = true,
        compress = true,
        whole_file = false,
        acls = true,
        verbose = true
    },
    ssh = {
        port = 22,
        _extra = {"/usr/bin/ssh -l root -p 22 -i /root/.ssh/id_rsa -o StrictHostKeyChecking=no"}
    } 
}

running the
/etc/init.d/lsyncd start
folder and everything in it is successfully copied to the remote server, but the rights to folders and files, as well as their owners, are not saved. For example, in the source folder there are folders for writing with rights 777, or files with rights 666 - in the destination folder they have rights 755 and 644, respectively.
WHY?
If you run rsync from the console like this:
rsync --progress -avz -e ssh /var/www/html/ [email protected]:/var/www/html/
then everything is perfectly copied with rights preserved.
WHY?
thank.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2018-11-26
@fulltext

what version of lsyncd?
It seems there is such a problem in 2.0, but in 2.1 it has already been fixed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question