I'm having an issue where files are been copied to the remote server except the owner/group of replicated files on the target server is always '1002'. The permissions of the source are respected and replicated correctly on the target. I just can't figure out a way to preserve the owner (and group) of the replicated files.

Lsyncd Version: 2.2.2

my setting below:

settings {
    logfile = "/var/log/lsyncd/lsyncd.log",
    statusFile = "/var/log/lsyncd/lsyncd.status"

sync {
    delete = "running", -- prevents deletion of files on startup (ie when a server comes back online, don't delete files that are new on the backup)
    delay = 5, -- run every 5 seconds instead of default 20
    exclude = {
    rsync = {
        archive = true, -- use the archive flag in rsync
        perms = true, -- Keep the permissions
        owner = true, -- Keep the owner
        compress = true,
        acls = true,
            xattrs = true,
        _extra = {"-a"}, -- Sometimes permissions and owners isn't copied correctly so the _extra can be used for any flag in rsync


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.