A remote system generates statistics files every 5 minutes and places them in a certain directory. At any given time there are 1000+ files in that directory. Every 5 minutes I want to copy the newest file to my server for analysis. The problem I am having is that the files on the remote system are not readable by "all", and the remote sysadmin does not want to give me access to the login that can read them because that login has write permissions that I don't need.
The sysadmin doesn't mind giving me "read" access to the entire system.
I had been using this command successfully every 5 minutes:
rsync -az -e "ssh -tt" --rsync-path="sudo rsync" REMOTE_SYSTEM:/var/logs/ .
I don't have access to /etc/sudoers so I don't know the exact settings of "tty_require" and "tty_tickets". When I initially set it up -t didn't work but -tt did....not sure of the exact difference.
This command has worked for months until we upgraded our local server from Redhat5.11 -> CentOS6.6. Now I get an error:
tcgetattr: Invalid argument
unexpected tag 87 [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(1134) [receiver=3.0.6]
RSYNC version/protocol are the same across the upgrade on both servers. SSH version changed from OpenSSH_4.3p2 to OpenSSH_5.3p1 with the CentOS upgrade.
Google gave nothing for "tag 87". Changing sudoers on the remote system is difficult.
I am not wedded to this solution but it was working before the upgrade and met the requirements. If I can solve by tweaking the options on my side that is preferable to getting the sysadmin to make changes on their side. I suppose I can pull the RSYNC source and debug/patch around the issue, but tweaking options is a lot more desirable.
Other suggestions welcome!