I have a set of files on server_a (server_a:/orig_files/) and want to scp them to server_b (server_b:/copied_files/) nut want to change the permissions along the way.
So, given the files on server_a with the indicated permissions:
[mike@server_a orig_files]# ll
-rw-r--r-- 1 mike users 22744 Feb 15 01:17 install.log
-rw-r--r-- 1 mike users 4371 Feb 15 01:17 install.log.syslog
How do I scp them to server_b such that they have different permissions as seen below:
[mike@server_b copied_files]# ll
-rw------- 1 mike users 22744 Feb 15 01:17 install.log
-rw------- 1 mike users 4371 Feb 15 01:17 install.log.syslog
Can 'scp' change permissions on the fly like this? I cannot change the permissions of the files on server_a first and the files must be "pushed" from server_a to server_b (i.e. server_b has no route to server_a, but server_a has a route to server_b).