Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SCP

Status
Not open for further replies.

tech005

MIS
Dec 11, 2003
36
US
How to preserve the ownership & file permission when you copy files between two nodes usin scp.
 
sorry, I was going to test this out then realized I have rlogin disabled for root on all my servers.

good luck.
 
Be glad it doesn't preserve user. If it did, anyone that has root privileges on a machine that you allow to connect would be able to escalate their privileges on your machine:

1: on my machine, where I'm root, I create a setuid program that's owned by root and executes /bin/ksh.
2: I grant universal read rights to the program on my machine.
3: logging in as a regular user that's allow to ssh to your machine, I scp the file over to my account on your machine, preserving user and permissions.
4: I logon to your machine and execute the handy little root shell that's waiting for me.

That said, you might be able to use rsync to accomplish what you want.

Rod Knowlton

IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top