My problem statement is how to auto sync /home/username/script folder to /var/www/html. So whenever files under script folder are updated then it will update them in destination folder, and also chown apache:apache & chmod 755. I tried using lsyncd and this is my conf file.
settings {
logfile = "/var/log/lsyncd/lsyncd.log",
statusFile = "/var/log/lsyncd/lsyncd-status.log"
}
sync{default.rsync, delete=false, source="/home/joel/script", target="/var/www/html/script", rsync = {chmod = "755", chown = "apache:apache"}}
This does sync the folder script in the destination when I try running it from commandline, but chmod or chown never works. Kindly advice