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 Chriss Miller 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
Joined
Dec 11, 2003
Messages
36
Location
US
How to preserve the ownership & file permission when you copy files between two nodes usin scp.
 
Have you tried

scp -p

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
are you root?

Does the owner exist on both machines?

 
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.

Similar threads

  • Locked
  • Question Question
Replies
3
Views
146
  • Locked
  • Question Question
Replies
12
Views
1K

Part and Inventory Search

Sponsor

Back
Top